Commit 9caaa5edd1214244a8603991799a19d8fba69e1b
合并冲突1
Showing
42 changed files
with
853 additions
and
75 deletions
app.wxss
| @@ -1211,6 +1211,11 @@ background: #ffe3e2; | @@ -1211,6 +1211,11 @@ background: #ffe3e2; | ||
| 1211 | content: "\e618"; | 1211 | content: "\e618"; |
| 1212 | } | 1212 | } |
| 1213 | 1213 | ||
| 1214 | +.icon-weixin:before { | ||
| 1215 | + content: "\e677"; | ||
| 1216 | +} | ||
| 1217 | + | ||
| 1218 | + | ||
| 1214 | /* 去掉零售价划线 */ | 1219 | /* 去掉零售价划线 */ |
| 1215 | .no_line_x{ | 1220 | .no_line_x{ |
| 1216 | text-decoration: none !important; | 1221 | text-decoration: none !important; |
components/diy_top_nav/diy_top_nav.js
0 → 100644
| 1 | +// components/diy_top_nav/diy_top_nav.js | ||
| 2 | +const app = getApp(); | ||
| 3 | +var os = app.globalData.setting; | ||
| 4 | +Component({ | ||
| 5 | + /** | ||
| 6 | + * 组件的属性列表 | ||
| 7 | + */ | ||
| 8 | + properties: { | ||
| 9 | + nav_type:{ | ||
| 10 | + type:Number, | ||
| 11 | + value:0, | ||
| 12 | + }, | ||
| 13 | + istop:{ | ||
| 14 | + type:Number, | ||
| 15 | + value:0, | ||
| 16 | + }, | ||
| 17 | + nav_title:{ | ||
| 18 | + type:String, | ||
| 19 | + value:'首页', | ||
| 20 | + }, | ||
| 21 | + nav_frontColor:{ | ||
| 22 | + type:String, | ||
| 23 | + value:'#ffffff', | ||
| 24 | + }, | ||
| 25 | + nav_backgroundColor:{ | ||
| 26 | + type:String, | ||
| 27 | + value:'#ff7295', | ||
| 28 | + }, | ||
| 29 | + is_share:{ | ||
| 30 | + type:Boolean, | ||
| 31 | + value:true | ||
| 32 | + } | ||
| 33 | + }, | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 组件的初始数据 | ||
| 37 | + */ | ||
| 38 | + data: { | ||
| 39 | + imghots: os.imghost, | ||
| 40 | + nav_h:0, //导航胶囊上面状态栏的高度 | ||
| 41 | + mentButt_h:0,//导航胶囊高度 | ||
| 42 | + navleft_pb:0, //导航左边的自定义内容的左右内边距 | ||
| 43 | + nav_left_w:281, // 导航左边自定义的内容宽度 | ||
| 44 | + navleft_w:0, //左边胶囊宽度 | ||
| 45 | + nav_pb:0, // 导航的下内边距 | ||
| 46 | + show_menu:false,//详情页导航下拉菜单显示 | ||
| 47 | + men_list:[ | ||
| 48 | + { | ||
| 49 | + name:'首页', | ||
| 50 | + img:'miniapp/js_img/goods_info/home.png?v=3', | ||
| 51 | + url:'/pages/index/index/index' | ||
| 52 | + }, | ||
| 53 | + { | ||
| 54 | + name:'我的订单', | ||
| 55 | + img:'miniapp/js_img/goods_info/order.png?v=3', | ||
| 56 | + url:'/pages/user/order_list/order_list' | ||
| 57 | + }, | ||
| 58 | + { | ||
| 59 | + name:'我的收藏', | ||
| 60 | + img:'miniapp/js_img/goods_info/collect.png?v=3', | ||
| 61 | + url:'/packageB/pages/user/collect_list/collect_list' | ||
| 62 | + }, | ||
| 63 | + // { | ||
| 64 | + // name:'浏览足迹', | ||
| 65 | + // img:'', | ||
| 66 | + // url:'' | ||
| 67 | + // }, | ||
| 68 | + ] | ||
| 69 | + }, | ||
| 70 | + lifetimes:{ | ||
| 71 | + attached:function(){ | ||
| 72 | + //满屏顶部导航参数获取----------- | ||
| 73 | + try { | ||
| 74 | + let systemInfo = wx.getSystemInfoSync() | ||
| 75 | + let mentButt = wx.getMenuButtonBoundingClientRect() | ||
| 76 | + let nav_pb = mentButt.top - systemInfo.statusBarHeight | ||
| 77 | + let navleft_pb = systemInfo.windowWidth - mentButt.right | ||
| 78 | + | ||
| 79 | + let user_no=''; | ||
| 80 | + if(getApp().globalData.userInfo){ | ||
| 81 | + user_no=getApp().globalData.userInfo.erpvipno | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + this.setData({ | ||
| 85 | + nav_h:mentButt.top, | ||
| 86 | + mentButt_h:mentButt.height, | ||
| 87 | + nav_left_w:mentButt.left, | ||
| 88 | + navleft_pb, | ||
| 89 | + nav_pb, | ||
| 90 | + navleft_w:mentButt.width*0.9, | ||
| 91 | + user_no | ||
| 92 | + }) | ||
| 93 | + } catch (e) { | ||
| 94 | + console.error(e); | ||
| 95 | + wx.showToast({ | ||
| 96 | + title: '系统参数获取失败', | ||
| 97 | + icon: 'none', | ||
| 98 | + duration: 2000 | ||
| 99 | + }) | ||
| 100 | + // this.setData({ | ||
| 101 | + // is_full_screen_navigation:false | ||
| 102 | + // }) | ||
| 103 | + // Do something when catch error | ||
| 104 | + } | ||
| 105 | + } | ||
| 106 | + }, | ||
| 107 | + /** | ||
| 108 | + * 组件的方法列表 | ||
| 109 | + */ | ||
| 110 | + methods: { | ||
| 111 | + nav_menu(e){ | ||
| 112 | + let url=e.currentTarget.dataset.url | ||
| 113 | + getApp().goto(url) | ||
| 114 | + }, | ||
| 115 | + show_menu_fn(){ | ||
| 116 | + this.setData({ | ||
| 117 | + show_menu:!this.data.show_menu | ||
| 118 | + }) | ||
| 119 | + }, | ||
| 120 | + hide_menu_fn(){ | ||
| 121 | + this.setData({ | ||
| 122 | + show_menu:false | ||
| 123 | + }) | ||
| 124 | + }, | ||
| 125 | + //分享 | ||
| 126 | + fenx_fn(){ | ||
| 127 | + this.triggerEvent('clickShare') | ||
| 128 | + }, | ||
| 129 | + call_back(){ | ||
| 130 | + wx.navigateBack({ | ||
| 131 | + delta:1, | ||
| 132 | + fail:()=>{ | ||
| 133 | + wx.reLaunch({ | ||
| 134 | + url: '/pages/index/index/index', | ||
| 135 | + }) | ||
| 136 | + } | ||
| 137 | + }) | ||
| 138 | + }, | ||
| 139 | + nav_search(){ | ||
| 140 | + getApp().goto('/pages/goods/search/search') | ||
| 141 | + } | ||
| 142 | + } | ||
| 143 | +}) |
components/diy_top_nav/diy_top_nav.json
0 → 100644
components/diy_top_nav/diy_top_nav.wxml
0 → 100644
| 1 | +<!--components/diy_top_nav/diy_top_nav.wxml--> | ||
| 2 | +<!-- 支撑作用 --> | ||
| 3 | +<view wx:if="{{nav_type==-1}}" style="padding-bottom:{{nav_pb}}px;color: {{nav_frontColor}};"> | ||
| 4 | + <view style="height: {{nav_h}}px;width: 100%;"></view> | ||
| 5 | + <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: center;"></view> | ||
| 6 | +</view> | ||
| 7 | +<!-- 默认没有返回按钮 --> | ||
| 8 | +<view wx:if="{{nav_type==0}}" style="padding-bottom:{{nav_pb}}px;background-color:{{nav_backgroundColor}};color: {{nav_frontColor}};"> | ||
| 9 | + <view style="height: {{nav_h}}px;width: 100%;"></view> | ||
| 10 | + <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: center;">{{nav_title}}</view> | ||
| 11 | +</view> | ||
| 12 | +<!-- 默认有返回按钮 --> | ||
| 13 | +<view wx:if="{{nav_type==5}}" style="padding-bottom:{{nav_pb}}px;background-color:{{nav_backgroundColor}};color: {{nav_frontColor}};"> | ||
| 14 | + <view style="height: {{nav_h}}px;width: 100%;"></view> | ||
| 15 | + <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: center;position: relative;"> | ||
| 16 | + <view catchtap="call_back" class="call_back_box"> | ||
| 17 | + <text class="nav_fh" ></text> | ||
| 18 | + </view> | ||
| 19 | + {{nav_title}} | ||
| 20 | + </view> | ||
| 21 | +</view> | ||
| 22 | + | ||
| 23 | +<!-- 广告轮播时 --> | ||
| 24 | +<view wx:if="{{nav_type==1}}" style="padding-bottom:{{nav_pb}}px;color: {{nav_frontColor}};"> | ||
| 25 | + <view style="height: {{nav_h}}px;width: 100%;"></view> | ||
| 26 | + <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: left;padding-left: 20rpx;">{{nav_title}}</view> | ||
| 27 | +</view> | ||
| 28 | + | ||
| 29 | +<!-- 详情页面 --> | ||
| 30 | +<view wx:if="{{nav_type==2}}" style="padding-bottom:{{nav_pb}}px;{{ istop ? '' : ('background-color:'+nav_backgroundColor)}};color:{{nav_frontColor}};"> | ||
| 31 | + <!-- 显示一下user_id --> | ||
| 32 | + <view style="position:relative;height: {{nav_h}}px;width: 100%; "> | ||
| 33 | + <view wx:if="{{user_no}}" class="tb_con" >ID:{{user_no}}</view> | ||
| 34 | + </view> | ||
| 35 | + <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;display: flex;"> | ||
| 36 | + <view class="nav_left" style="width: {{nav_left_w}}px;padding: 0 {{navleft_pb}}px;"> | ||
| 37 | + <view class="navl_left flex" style="width:{{navleft_w}}px;padding: 0;"> | ||
| 38 | + <!-- <text class="iconfont1 icon-line-homeshouye-01" style="color: #000;font-size: 20px;"></text> --> | ||
| 39 | + <view catchtap="call_back" class="flex nav_left_box"> | ||
| 40 | + <text class="nav_fh" ></text> | ||
| 41 | + </view> | ||
| 42 | + <text class="navl_left_b"></text> | ||
| 43 | + <!-- <text class="iconfont icon-xingyungou" style="color:#898989;"></text> --> | ||
| 44 | + <view catchtap="show_menu_fn" class="flex nav_left_box"> | ||
| 45 | + <view class="iconfont icon-fenlei" style="color: #000;position: relative;" > | ||
| 46 | + <view class="list_menu" wx:if="{{show_menu}}"> | ||
| 47 | + <view class="list_menu_top"></view> | ||
| 48 | + <view wx:for="{{men_list}}" class="menu_item" data-url="{{item.url}}" catchtap="nav_menu"> | ||
| 49 | + <image src="{{imghots + item.img}}" class="logo" lazy-load></image> | ||
| 50 | + <view>{{item.name}}</view> | ||
| 51 | + </view> | ||
| 52 | + </view> | ||
| 53 | + </view> | ||
| 54 | + </view> | ||
| 55 | + </view> | ||
| 56 | + <view wx:if="{{!istop}}" catchtap="nav_search" class="navl_minddle" style="margin: 0 {{navleft_pb}}px;"> | ||
| 57 | + <icon type="search" size="28rpx" color="#898989" class="nav_search"/> | ||
| 58 | + <text>搜索更多商品</text> | ||
| 59 | + </view> | ||
| 60 | + <view wx:else ></view> | ||
| 61 | + <view wx:if="{{is_share}}" class="navl_right" catchtap="fenx_fn" style="height:{{mentButt_h}}px;width:{{mentButt_h}}px;"> | ||
| 62 | + <text class="iconfont icon-weixin" style="color:rgb(4, 174, 15);size: 16rpx;"></text> | ||
| 63 | + <!-- <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image> --> | ||
| 64 | + </view> | ||
| 65 | + <view wx:else></view> | ||
| 66 | + </view> | ||
| 67 | + <view class="nav_right">1212121</view> | ||
| 68 | + </view> | ||
| 69 | +</view> |
components/diy_top_nav/diy_top_nav.wxss
0 → 100644
| 1 | +/* components/diy_top_nav/diy_top_nav.wxss */ | ||
| 2 | +@import '../../app.wxss'; | ||
| 3 | +.nav_left{ | ||
| 4 | + box-sizing: border-box; | ||
| 5 | + display: flex; | ||
| 6 | + align-items: center; | ||
| 7 | + justify-content: space-between; | ||
| 8 | +} | ||
| 9 | +.nav_left_box{ | ||
| 10 | + width: 48%; | ||
| 11 | + align-items: center; | ||
| 12 | + justify-content: center; | ||
| 13 | + height: 100%; | ||
| 14 | +} | ||
| 15 | +.nav_right{ | ||
| 16 | + flex: 1; | ||
| 17 | +} | ||
| 18 | +.navl_left{ | ||
| 19 | + height: 100%; | ||
| 20 | + background-color:rgba(255, 255, 255, .5); | ||
| 21 | + border-radius:30rpx; | ||
| 22 | + border: 1rpx solid rgba(227, 227, 227); | ||
| 23 | + display: flex; | ||
| 24 | + align-items: center; | ||
| 25 | + justify-content: space-around; | ||
| 26 | + padding: 0 4%; | ||
| 27 | + box-sizing: border-box; | ||
| 28 | +} | ||
| 29 | + | ||
| 30 | +.navl_minddle{ | ||
| 31 | + height: 100%; | ||
| 32 | + flex: 1; | ||
| 33 | + background-color: bisque; | ||
| 34 | + display: flex; | ||
| 35 | + align-items: center; | ||
| 36 | + vertical-align: middle; | ||
| 37 | + /* justify-content: center; */ | ||
| 38 | + border-radius: 30rpx; | ||
| 39 | + background-color: rgb(242, 243, 245); | ||
| 40 | + /* background-color: #898989; */ | ||
| 41 | + font-size: 28rpx; | ||
| 42 | + color: #898989; | ||
| 43 | +} | ||
| 44 | +.nav_search{ | ||
| 45 | + display: flex; | ||
| 46 | + align-items: center; | ||
| 47 | + margin: 0 10rpx 0 20rpx; | ||
| 48 | +} | ||
| 49 | +.navl_right{ | ||
| 50 | + background-color: #fff; | ||
| 51 | + border-radius: 100%; | ||
| 52 | + display: flex; | ||
| 53 | + align-items: center; | ||
| 54 | + justify-content: center; | ||
| 55 | + border: 1rpx solid rgba(227, 227, 227); | ||
| 56 | +} | ||
| 57 | +.navl_left_b{ | ||
| 58 | + width: 1rpx; | ||
| 59 | + height: 65%; | ||
| 60 | + background-color:rgb(227,227,227) ; | ||
| 61 | +} | ||
| 62 | +.we_chat{ | ||
| 63 | + width: 45rpx; | ||
| 64 | + height: 45rpx; | ||
| 65 | +} | ||
| 66 | +.nav_fh { | ||
| 67 | + width: 18rpx; | ||
| 68 | + height: 18rpx; | ||
| 69 | + border-top: 2rpx solid #000; | ||
| 70 | + border-right: 2rpx solid #000; | ||
| 71 | + transform: rotateZ(-135deg); | ||
| 72 | + display: inline-block; | ||
| 73 | + margin-bottom: 3rpx; | ||
| 74 | +} | ||
| 75 | +.list_menu{ | ||
| 76 | + position: absolute; | ||
| 77 | + /* bottom: -10rpx; */ | ||
| 78 | + /* top: -13rpx; */ | ||
| 79 | + left: -35rpx; | ||
| 80 | + /* width: 180rpx; */ | ||
| 81 | + /* width: auto; */ | ||
| 82 | + padding: 10rpx 26rpx; | ||
| 83 | + /* height: 400rpx; */ | ||
| 84 | + margin-top: 18rpx; | ||
| 85 | + background-color: #fff; | ||
| 86 | + /* background-color: rebeccapurple; */ | ||
| 87 | + border-radius: 15rpx; | ||
| 88 | + z-index: 9999999; | ||
| 89 | +} | ||
| 90 | +.list_menu_top{ | ||
| 91 | + position: absolute; | ||
| 92 | + top: -10rpx; | ||
| 93 | + left: 50rpx; | ||
| 94 | + width: 26rpx; | ||
| 95 | + height: 26rpx; | ||
| 96 | + /* background-color: rebeccapurple; */ | ||
| 97 | + background-color: #fff; | ||
| 98 | + transform: rotateZ(45deg); | ||
| 99 | + display: inline-block; | ||
| 100 | +} | ||
| 101 | +.menu_item{ | ||
| 102 | + display: flex; | ||
| 103 | + align-items: center; | ||
| 104 | + font-size: 26rpx; | ||
| 105 | + white-space: nowrap; | ||
| 106 | + /* padding: 20rpx; */ | ||
| 107 | +} | ||
| 108 | +.menu_item image{ | ||
| 109 | + width: 36rpx; | ||
| 110 | + height: 36rpx; | ||
| 111 | + margin-right: 20rpx; | ||
| 112 | +} | ||
| 113 | +.call_back_box{ | ||
| 114 | + width: 100rpx; | ||
| 115 | + height: 100%; | ||
| 116 | + display: flex; | ||
| 117 | + align-items: center; | ||
| 118 | + justify-content: center; | ||
| 119 | + position: absolute; | ||
| 120 | + /* background-color: blueviolet; */ | ||
| 121 | + left: 0; | ||
| 122 | + bottom: 0; | ||
| 123 | +} | ||
| 124 | +.call_back_box .nav_fh{ | ||
| 125 | + width: 20rpx; | ||
| 126 | + height: 20rpx; | ||
| 127 | +} | ||
| 128 | + | ||
| 129 | +.tb_con{ | ||
| 130 | + position: absolute; bottom: 0; right: 24rpx; font-size: 18rpx;color: #333; | ||
| 131 | +} | ||
| 0 | \ No newline at end of file | 132 | \ No newline at end of file |
packageA/pages/chongzhi/chongzhi.js
| @@ -183,16 +183,45 @@ Page({ | @@ -183,16 +183,45 @@ Page({ | ||
| 183 | app.goto('../chongzhiDetails/chongzhiDetails?id=' + id+"&type=1"); | 183 | app.goto('../chongzhiDetails/chongzhiDetails?id=' + id+"&type=1"); |
| 184 | }, | 184 | }, |
| 185 | 185 | ||
| 186 | - viewDetails(e){ | 186 | + viewDetails(e){ |
| 187 | var index=e.currentTarget.dataset.index; | 187 | var index=e.currentTarget.dataset.index; |
| 188 | - var WriteOffCode=this.data.list[index].WriteOffCode; | 188 | + //var WriteOffCode=this.data.list[index].WriteOffCode; |
| 189 | + var id=this.data.list[index].ID; | ||
| 190 | + | ||
| 191 | + this.detail_next(id); | ||
| 192 | + }, | ||
| 193 | + | ||
| 194 | + async detail_next(id){ | ||
| 195 | + var code=''; | ||
| 196 | + //获取二维码,强制更新 | ||
| 197 | + let res= await getApp().request.promisePut("/api/weshop/store/updateErpApi",{ | ||
| 198 | + data:{ | ||
| 199 | + store_id:getApp().globalData.setting.stoid, | ||
| 200 | + ApiName:"/api/erp/vip/buyaddmoneyactDetails/updateMainCode", | ||
| 201 | + Id:id, | ||
| 202 | + VIPId:getApp().globalData.userInfo.erpvipid | ||
| 203 | + } | ||
| 204 | + }) | ||
| 205 | + if(res){ | ||
| 206 | + if(res.data.code==-1){ | ||
| 207 | + util.m_toast(res.data.msg); | ||
| 208 | + return false; | ||
| 209 | + } | ||
| 210 | + if(res.data.data) | ||
| 211 | + code = res.data.data.WriteOffCode; | ||
| 212 | + } | ||
| 213 | + if(!code){ | ||
| 214 | + util.m_toast('未找到二维码'); | ||
| 215 | + return false; | ||
| 216 | + } | ||
| 217 | + | ||
| 218 | + | ||
| 189 | var qrcode = this.selectComponent("#qrcode"); //组件的id | 219 | var qrcode = this.selectComponent("#qrcode"); //组件的id |
| 190 | - var code=WriteOffCode; | ||
| 191 | - var e={is_fw:1,val:code,code:code} | ||
| 192 | - qrcode.open(e); | ||
| 193 | - | 220 | + var e={is_fw:1,val:code,code:code} |
| 221 | + qrcode.open(e); | ||
| 194 | }, | 222 | }, |
| 195 | - | 223 | + |
| 224 | + | ||
| 196 | // 检测上拉滚动到底部 | 225 | // 检测上拉滚动到底部 |
| 197 | // scrollToLower: function (requestData, callback) { | 226 | // scrollToLower: function (requestData, callback) { |
| 198 | // // 数据总量 | 227 | // // 数据总量 |
packageA/pages/chongzhi/chongzhi.wxml
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | <view class="fs28 ellipsis-2 txt-justify">{{item.ActName}}</view> | 28 | <view class="fs28 ellipsis-2 txt-justify">{{item.ActName}}</view> |
| 29 | <view> | 29 | <view> |
| 30 | <view class="price fs24">零售价:¥{{item.PosPrice}}</view> | 30 | <view class="price fs24">零售价:¥{{item.PosPrice}}</view> |
| 31 | - <view class="date fs24">{{(currentIndex == 0 ? '兑换截止日期': '核销时间') + ':' + item.BeginDate + '至' + (item.EndDate==''?'不限':item.EndDate)}}</view> | 31 | + <view class="date fs24">购买时间:{{item.BillDate}}</view> |
| 32 | </view> | 32 | </view> |
| 33 | </view> | 33 | </view> |
| 34 | </view> | 34 | </view> |
| @@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
| 36 | <view class="bottom" wx:if="{{currentIndex == 0}}" > | 36 | <view class="bottom" wx:if="{{currentIndex == 0}}" > |
| 37 | <text wx:if="{{g_filter.is_acting(item.EndDate) || item.EndDate==''}}" | 37 | <text wx:if="{{g_filter.is_acting(item.EndDate) || item.EndDate==''}}" |
| 38 | catchtap="viewDetails" data-index="{{index}}" class="btn" >立即使用</text> | 38 | catchtap="viewDetails" data-index="{{index}}" class="btn" >立即使用</text> |
| 39 | - <text wx:else class="btn" style="background-color: #ccc;">已过期</text> | 39 | + <text wx:else class="btn" style="background-color: #ccc;">已过期</text> |
| 40 | <text data-index="{{index}}" class="btn details" >详情</text> | 40 | <text data-index="{{index}}" class="btn details" >详情</text> |
| 41 | </view> | 41 | </view> |
| 42 | <view class="bottom" wx:if="{{currentIndex == 1}}" > | 42 | <view class="bottom" wx:if="{{currentIndex == 1}}" > |
packageA/pages/chongzhiDetails/chongzhiDetails.js
| @@ -63,7 +63,8 @@ Page({ | @@ -63,7 +63,8 @@ Page({ | ||
| 63 | if(options.type==1){ | 63 | if(options.type==1){ |
| 64 | api="/api/weshop/users/getBuyaddmoneyactDetails"; | 64 | api="/api/weshop/users/getBuyaddmoneyactDetails"; |
| 65 | } | 65 | } |
| 66 | - | 66 | + |
| 67 | + this.data.op_id=options.id; | ||
| 67 | app.request.get(api, { | 68 | app.request.get(api, { |
| 68 | data: { | 69 | data: { |
| 69 | Id:options.id, | 70 | Id:options.id, |
| @@ -71,8 +72,8 @@ Page({ | @@ -71,8 +72,8 @@ Page({ | ||
| 71 | user_id: UserInfo.user_id, | 72 | user_id: UserInfo.user_id, |
| 72 | }, | 73 | }, |
| 73 | success: function (res) { | 74 | success: function (res) { |
| 75 | + | ||
| 74 | var result=res.data.data; | 76 | var result=res.data.data; |
| 75 | - | ||
| 76 | var now=new Date(); | 77 | var now=new Date(); |
| 77 | var reg = RegExp("-", "g"); | 78 | var reg = RegExp("-", "g"); |
| 78 | var endtime = result.EndDate.replace(reg, '/'); | 79 | var endtime = result.EndDate.replace(reg, '/'); |
| @@ -136,11 +137,41 @@ Page({ | @@ -136,11 +137,41 @@ Page({ | ||
| 136 | 137 | ||
| 137 | }, | 138 | }, |
| 138 | 139 | ||
| 139 | - onUse() { | ||
| 140 | - var qrcode = this.selectComponent("#qrcode"); //组件的id | ||
| 141 | - var code=this.data.result.WriteOffCode; | ||
| 142 | - var e={is_fw:1,val:code,code:code} | ||
| 143 | - qrcode.open(e); | 140 | + async onUse() { |
| 141 | + //-- 如果过期就不可用 --- | ||
| 142 | + if(this.data.result.IsGQ){ | ||
| 143 | + return false; | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + | ||
| 147 | + //var code=this.data.result.WriteOffCode; | ||
| 148 | + var code=''; | ||
| 149 | + | ||
| 150 | + //获取二维码 | ||
| 151 | + let res= await getApp().request.promisePut("/api/weshop/store/updateErpApi",{ | ||
| 152 | + data:{ | ||
| 153 | + store_id:os.stoid, | ||
| 154 | + ApiName:"/api/erp/vip/buyaddmoneyactDetails/updateMainCode", | ||
| 155 | + Id:this.data.op_id, | ||
| 156 | + VIPId:getApp().globalData.userInfo.erpvipid | ||
| 157 | + } | ||
| 158 | + }) | ||
| 159 | + if(res){ | ||
| 160 | + if(res.data.code==-1){ | ||
| 161 | + util.m_toast(res.data.msg); | ||
| 162 | + return false; | ||
| 163 | + } | ||
| 164 | + if(res.data.data) | ||
| 165 | + code = res.data.data.WriteOffCode; | ||
| 166 | + } | ||
| 167 | + if(!code){ | ||
| 168 | + util.m_toast('未找到二维码'); | ||
| 169 | + return false; | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + var qrcode = this.selectComponent("#qrcode"); //组件的id | ||
| 173 | + var e={is_fw:1,val:code,code:code} | ||
| 174 | + qrcode.open(e); | ||
| 144 | }, | 175 | }, |
| 145 | 176 | ||
| 146 | 177 | ||
| @@ -286,5 +317,53 @@ Page({ | @@ -286,5 +317,53 @@ Page({ | ||
| 286 | if(url){ | 317 | if(url){ |
| 287 | getApp().goto(url); | 318 | getApp().goto(url); |
| 288 | } | 319 | } |
| 320 | + }, | ||
| 321 | + | ||
| 322 | + //-- 显示二维码 -- | ||
| 323 | + getcode(e) { | ||
| 324 | + var idx = e.currentTarget.dataset.index; | ||
| 325 | + var item = this.data.result.givelist[idx]; | ||
| 326 | + this.get_code_next(item); | ||
| 327 | + }, | ||
| 328 | + | ||
| 329 | + async get_code_next(item){ | ||
| 330 | + var th = this; | ||
| 331 | + //--获取成功的时候-- | ||
| 332 | + var no = ''; | ||
| 333 | + | ||
| 334 | + var id=item.GiftsId; | ||
| 335 | + var IsRetrieval=item.IsRetrieval; | ||
| 336 | + | ||
| 337 | + //-- 有调起的时候 -- | ||
| 338 | + if(IsRetrieval){ | ||
| 339 | + no=item.WriteOffCodeOne; | ||
| 340 | + }else { | ||
| 341 | + //获取二维码 | ||
| 342 | + let res = await getApp().request.promisePut("/api/weshop/store/updateErpApi", { | ||
| 343 | + data: { | ||
| 344 | + store_id: os.stoid, | ||
| 345 | + ApiName: "/api/erp/vip/buyaddmoneyactDetails/updateMainCodeOne", | ||
| 346 | + Id: id, | ||
| 347 | + VIPId: getApp().globalData.userInfo.erpvipid | ||
| 348 | + } | ||
| 349 | + }) | ||
| 350 | + if (res) { | ||
| 351 | + if (res.data.code == -1) { | ||
| 352 | + util.m_toast(res.data.msg); | ||
| 353 | + return false; | ||
| 354 | + } | ||
| 355 | + if (res.data.data) | ||
| 356 | + no = res.data.data.WriteOffCode; | ||
| 357 | + } | ||
| 358 | + } | ||
| 359 | + if(!no){ | ||
| 360 | + util.m_toast('未找到二维码'); | ||
| 361 | + return false; | ||
| 362 | + } | ||
| 363 | + | ||
| 364 | + | ||
| 365 | + var qc_com = th.selectComponent("#qrcode"); //组件的id | ||
| 366 | + var e={is_fw:1,val:no,code:no} | ||
| 367 | + qc_com.open(e) | ||
| 289 | } | 368 | } |
| 290 | }) | 369 | }) |
| 291 | \ No newline at end of file | 370 | \ No newline at end of file |
packageA/pages/chongzhiDetails/chongzhiDetails.wxml
| @@ -39,13 +39,23 @@ | @@ -39,13 +39,23 @@ | ||
| 39 | <image wx:if="{{item.PAdvanceItemId>0}}" src="{{url}}/miniapp/images/giftbag/gift01.png"></image><!-- 预存 --> | 39 | <image wx:if="{{item.PAdvanceItemId>0}}" src="{{url}}/miniapp/images/giftbag/gift01.png"></image><!-- 预存 --> |
| 40 | </view> | 40 | </view> |
| 41 | <!-- 右 --> | 41 | <!-- 右 --> |
| 42 | - <view class="info"> | 42 | + <view class="info" style="position: relative;"> |
| 43 | <view wx:if="{{item.GiveType=='0'}}">{{item.CouponSum}}元优惠券</view> | 43 | <view wx:if="{{item.GiveType=='0'}}">{{item.CouponSum}}元优惠券</view> |
| 44 | <view wx:elif="{{item.Integral>0}}">{{item.Integral}}积分</view> | 44 | <view wx:elif="{{item.Integral>0}}">{{item.Integral}}积分</view> |
| 45 | <view wx:elif="{{item.GradeSum>0}}">{{item.GradeSum}}成长值</view> | 45 | <view wx:elif="{{item.GradeSum>0}}">{{item.GradeSum}}成长值</view> |
| 46 | <view wx:else>{{item.GiveName}}</view> | 46 | <view wx:else>{{item.GiveName}}</view> |
| 47 | <!-- <view class="fs28 pdv10 txt-justify">节日可免费享受专业美甲,可以享受1次。</view> --> | 47 | <!-- <view class="fs28 pdv10 txt-justify">节日可免费享受专业美甲,可以享受1次。</view> --> |
| 48 | - <view wx:if="{{item.Qty>0}}" class="t-r fs24">数量:{{item.Qty}}</view> | 48 | + <view wx:if="{{item.Qty>0}}" class="fs24">数量:{{item.Qty}}</view> |
| 49 | + <view wx:if="{{item.GiveType=='2'}}" class="date fs24">{{'兑换截止日期' + ':' + item.BeginDate + '至' + (item.EndDate==''?'不限':item.EndDate) }}</view> | ||
| 50 | + | ||
| 51 | + <!-- 优化显示二维码 --> | ||
| 52 | + <view class="box_ware_code data-v-3a5b7e36" wx:if="{{item.GiveType=='2' && item.IsQrCode==1}}"> | ||
| 53 | + <!-- <block wx:if="{{c_state==0}}"> --> | ||
| 54 | + <image src="{{url+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" | ||
| 55 | + data-index="{{index}}" | ||
| 56 | + class="data-v-3a5b7e36"></image> | ||
| 57 | + </view> | ||
| 58 | + | ||
| 49 | </view> | 59 | </view> |
| 50 | </view> | 60 | </view> |
| 51 | </view> | 61 | </view> |
| @@ -57,7 +67,7 @@ | @@ -57,7 +67,7 @@ | ||
| 57 | <text wx:if="{{type==0}}" data-advance="{{result.Id}}" data-money="{{result.BeginSum}}" | 67 | <text wx:if="{{type==0}}" data-advance="{{result.Id}}" data-money="{{result.BeginSum}}" |
| 58 | class="btn" bindtap="go_buy">立即充值</text> | 68 | class="btn" bindtap="go_buy">立即充值</text> |
| 59 | <block wx:else> | 69 | <block wx:else> |
| 60 | - <text wx:if="{{result.AddType==0 || result.AddType=='0'}}" class="btn" bindtap="onUse">立即使用</text> | 70 | + <text wx:if="{{result.AddType==0 || result.AddType=='0'}}" class="btn {{result.IsGQ?'bk_huise':''}} " bindtap="onUse">立即使用</text> |
| 61 | <text wx:if="{{result.AddType==1 || result.AddType=='1'}}" class="btn" >已核销</text> | 71 | <text wx:if="{{result.AddType==1 || result.AddType=='1'}}" class="btn" >已核销</text> |
| 62 | </block> | 72 | </block> |
| 63 | </view> | 73 | </view> |
packageA/pages/chongzhiDetails/chongzhiDetails.wxss
| @@ -109,6 +109,10 @@ | @@ -109,6 +109,10 @@ | ||
| 109 | font-size: 28rpx; | 109 | font-size: 28rpx; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | +.btn.bk_huise { | ||
| 113 | + background-color: gainsboro; | ||
| 114 | +} | ||
| 115 | + | ||
| 112 | .img-block { | 116 | .img-block { |
| 113 | display: block; | 117 | display: block; |
| 114 | width: 100%; | 118 | width: 100%; |
| @@ -147,4 +151,20 @@ | @@ -147,4 +151,20 @@ | ||
| 147 | 151 | ||
| 148 | .container{ | 152 | .container{ |
| 149 | display: block;min-height: 100%;width: 100%;position: absolute;left: 0;top: 0;z-index: 1; | 153 | display: block;min-height: 100%;width: 100%;position: absolute;left: 0;top: 0;z-index: 1; |
| 154 | +} | ||
| 155 | + | ||
| 156 | +.date { | ||
| 157 | + padding-top: 10rpx; | ||
| 158 | + color: #FE6867; | ||
| 159 | +} | ||
| 160 | + | ||
| 161 | +.box_ware_code.data-v-3a5b7e36 { | ||
| 162 | + position: absolute; | ||
| 163 | + right: 10rpx; | ||
| 164 | + top: 10rpx; | ||
| 165 | +} | ||
| 166 | + | ||
| 167 | +.box_ware_code image.data-v-3a5b7e36 { | ||
| 168 | + width: 50rpx; | ||
| 169 | + height: 50rpx; | ||
| 150 | } | 170 | } |
| 151 | \ No newline at end of file | 171 | \ No newline at end of file |
packageA/pages/goodsInfo/goodsInfo.js
| @@ -212,9 +212,15 @@ Page({ | @@ -212,9 +212,15 @@ Page({ | ||
| 212 | 212 | ||
| 213 | hiddenCS: true, //控制客服操作菜单显示和控制 | 213 | hiddenCS: true, //控制客服操作菜单显示和控制 |
| 214 | 214 | ||
| 215 | - openSpecModal_flash_normal: 0, | ||
| 216 | - keyword:'', //门店搜索 | ||
| 217 | - sec_i:-1,//选中分类门店 下标 | 215 | + openSpecModal_flash_normal: 0, |
| 216 | + keyword:'', //门店搜索 | ||
| 217 | + sec_i:-1,//选中分类门店 下标 | ||
| 218 | + | ||
| 219 | + nav_frontColor: "#ffffff", | ||
| 220 | + nav_backgroundColor: "#ffffff", | ||
| 221 | + nav_type: 2, //导航类型 | ||
| 222 | + istop: 0, //是否置顶风格为1 | ||
| 223 | + searchbox_transparent: 1, | ||
| 218 | }, | 224 | }, |
| 219 | 225 | ||
| 220 | //------初始化加载---------- | 226 | //------初始化加载---------- |
packageA/pages/goodsInfo/goodsInfo.json
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | "warn": "/components/long_warn/long_warn", | 6 | "warn": "/components/long_warn/long_warn", |
| 7 | "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list", | 7 | "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list", |
| 8 | "privacy_pop": "/components/privacy_pop/privacy_pop", | 8 | "privacy_pop": "/components/privacy_pop/privacy_pop", |
| 9 | - "com_top_nav": "/components/com_top_nav/com_top_nav" | 9 | + "top_nav": "/components/diy_top_nav/diy_top_nav" |
| 10 | }, | 10 | }, |
| 11 | "navigationStyle": "custom" | 11 | "navigationStyle": "custom" |
| 12 | } | 12 | } |
| 13 | \ No newline at end of file | 13 | \ No newline at end of file |
packageA/pages/goodsInfo/goodsInfo.wxml
| @@ -2,16 +2,20 @@ | @@ -2,16 +2,20 @@ | ||
| 2 | <wxs module="filters" src="../../../utils/filter.wxs"></wxs> | 2 | <wxs module="filters" src="../../../utils/filter.wxs"></wxs> |
| 3 | <wxs module="g_filters" src="g_filter.wxs"></wxs> | 3 | <wxs module="g_filters" src="g_filter.wxs"></wxs> |
| 4 | <wxs module="tool" src="filter.wxs"></wxs> | 4 | <wxs module="tool" src="filter.wxs"></wxs> |
| 5 | - | ||
| 6 | -<com_top_nav title="{{data.goods_name}}"></com_top_nav> | ||
| 7 | - | ||
| 8 | <!-- 判断隐私是不是显示 --> | 5 | <!-- 判断隐私是不是显示 --> |
| 9 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> | 6 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> |
| 10 | - | 7 | +<!-- 顶开 --> |
| 8 | +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 11 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> | 9 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> |
| 12 | <block wx:if="{{isshow}}"> | 10 | <block wx:if="{{isshow}}"> |
| 13 | <view class="container"> | 11 | <view class="container"> |
| 14 | - <view class="type-navbar" style="top:{{top_nav}}px"> | 12 | + |
| 13 | + <view class="type-navbar_box"> | ||
| 14 | + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="{{false}}" | ||
| 15 | + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 16 | + </view> | ||
| 17 | + | ||
| 18 | + <view class="type-navbar" style="top:{{top_nav-4}}px"> | ||
| 15 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | 19 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
| 16 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | 20 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
| 17 | {{item.name}} | 21 | {{item.name}} |
packageA/pages/goodsInfo/goodsInfo.wxss
| @@ -2993,6 +2993,14 @@ button.custom-service::after{ | @@ -2993,6 +2993,14 @@ button.custom-service::after{ | ||
| 2993 | padding-left: 30rpx; | 2993 | padding-left: 30rpx; |
| 2994 | } | 2994 | } |
| 2995 | 2995 | ||
| 2996 | + | ||
| 2996 | /*按钮变灰色的优化*/ | 2997 | /*按钮变灰色的优化*/ |
| 2997 | .spec-cart-btn.gray{ background-color:gainsboro !important; } | 2998 | .spec-cart-btn.gray{ background-color:gainsboro !important; } |
| 2998 | 2999 | ||
| 3000 | +.type-navbar_box{ | ||
| 3001 | + position: fixed; | ||
| 3002 | + top: 0; | ||
| 3003 | + z-index: 999; | ||
| 3004 | + width: 100%; | ||
| 3005 | +} | ||
| 3006 | + |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js
| @@ -197,6 +197,12 @@ Page({ | @@ -197,6 +197,12 @@ Page({ | ||
| 197 | user_order_pt_state: 0, | 197 | user_order_pt_state: 0, |
| 198 | 198 | ||
| 199 | is_retail_price: 0, | 199 | is_retail_price: 0, |
| 200 | + | ||
| 201 | + nav_frontColor: "#ffffff", | ||
| 202 | + nav_backgroundColor: "#ffffff", | ||
| 203 | + nav_type: 2, //导航类型 | ||
| 204 | + istop: 0, //是否置顶风格为1 | ||
| 205 | + searchbox_transparent: 1, | ||
| 200 | }, | 206 | }, |
| 201 | 207 | ||
| 202 | //------初始化加载---------- | 208 | //------初始化加载---------- |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.json
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list", | 7 | "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list", |
| 8 | "share": "/components/share/share", | 8 | "share": "/components/share/share", |
| 9 | "privacy_pop": "/components/privacy_pop/privacy_pop", | 9 | "privacy_pop": "/components/privacy_pop/privacy_pop", |
| 10 | - "com_top_nav": "/components/com_top_nav/com_top_nav" | 10 | + "top_nav": "/components/diy_top_nav/diy_top_nav" |
| 11 | }, | 11 | }, |
| 12 | "navigationStyle": "custom" | 12 | "navigationStyle": "custom" |
| 13 | } | 13 | } |
| 14 | \ No newline at end of file | 14 | \ No newline at end of file |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml
| @@ -3,15 +3,21 @@ | @@ -3,15 +3,21 @@ | ||
| 3 | <wxs module="g_filters" src="g_filter.wxs"></wxs> | 3 | <wxs module="g_filters" src="g_filter.wxs"></wxs> |
| 4 | <wxs module="tool" src="filter.wxs"></wxs> | 4 | <wxs module="tool" src="filter.wxs"></wxs> |
| 5 | 5 | ||
| 6 | -<com_top_nav title="{{data.goods_name}}"></com_top_nav> | ||
| 7 | - | ||
| 8 | <!-- 判断隐私是不是显示 --> | 6 | <!-- 判断隐私是不是显示 --> |
| 9 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> | 7 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> |
| 8 | +<!-- 顶开 --> | ||
| 9 | +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 10 | 10 | ||
| 11 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> | 11 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> |
| 12 | <block wx:if="{{isshow}}"> | 12 | <block wx:if="{{isshow}}"> |
| 13 | <view class="container"> | 13 | <view class="container"> |
| 14 | - <view class="type-navbar" style="top:{{top_nav}}px"> | 14 | + |
| 15 | + <view class="type-navbar_box"> | ||
| 16 | + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1" | ||
| 17 | + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 18 | + </view> | ||
| 19 | + | ||
| 20 | + <view class="type-navbar" style="top:{{top_nav-4}}px"> | ||
| 15 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | 21 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
| 16 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | 22 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
| 17 | {{item.name}} | 23 | {{item.name}} |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| @@ -286,12 +286,19 @@ Page({ | @@ -286,12 +286,19 @@ Page({ | ||
| 286 | canBuy: false, | 286 | canBuy: false, |
| 287 | btnHidden: false, | 287 | btnHidden: false, |
| 288 | 288 | ||
| 289 | - hiddenCS: true, | 289 | + hiddenCS: true, |
| 290 | is_get_guide:0, | 290 | is_get_guide:0, |
| 291 | keyword:'', //门店搜索 | 291 | keyword:'', //门店搜索 |
| 292 | sec_i:-1,//选中分类门店 下标 | 292 | sec_i:-1,//选中分类门店 下标 |
| 293 | goodInfo_ad:"",//商品详情广告 | 293 | goodInfo_ad:"",//商品详情广告 |
| 294 | - adding:0 //避免重复点击 | 294 | + adding:0, //避免重复点击 |
| 295 | + | ||
| 296 | + nav_frontColor: "#ffffff", | ||
| 297 | + nav_backgroundColor: "#ffffff", | ||
| 298 | + nav_type: 2, //导航类型 | ||
| 299 | + istop: 0, //是否置顶风格为1 | ||
| 300 | + searchbox_transparent: 1 | ||
| 301 | + | ||
| 295 | }, | 302 | }, |
| 296 | 303 | ||
| 297 | //------初始化加载---------- | 304 | //------初始化加载---------- |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.json
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | "goods_recommend": "/components/goods_list/goods_list", | 7 | "goods_recommend": "/components/goods_list/goods_list", |
| 8 | "share": "/components/share/share", | 8 | "share": "/components/share/share", |
| 9 | "privacy_pop": "/components/privacy_pop/privacy_pop", | 9 | "privacy_pop": "/components/privacy_pop/privacy_pop", |
| 10 | - "com_top_nav": "/components/com_top_nav/com_top_nav" | 10 | + "top_nav": "/components/diy_top_nav/diy_top_nav" |
| 11 | }, | 11 | }, |
| 12 | "navigationStyle": "custom" | 12 | "navigationStyle": "custom" |
| 13 | } | 13 | } |
| 14 | \ No newline at end of file | 14 | \ No newline at end of file |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
| @@ -2,19 +2,25 @@ | @@ -2,19 +2,25 @@ | ||
| 2 | <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | 2 | <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> |
| 3 | <wxs module="g_filters" src="g_filter.wxs"></wxs> | 3 | <wxs module="g_filters" src="g_filter.wxs"></wxs> |
| 4 | <wxs module="tool" src="filter.wxs"></wxs> | 4 | <wxs module="tool" src="filter.wxs"></wxs> |
| 5 | - | ||
| 6 | -<com_top_nav title="{{gtitle}}"></com_top_nav> | ||
| 7 | - | 5 | +<!--<com_top_nav title="{{gtitle}}"></com_top_nav>--> |
| 8 | <!-- 判断隐私是不是显示 --> | 6 | <!-- 判断隐私是不是显示 --> |
| 9 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> | 7 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> |
| 10 | 8 | ||
| 9 | +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 10 | + | ||
| 11 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> | 11 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> |
| 12 | <block wx:if="{{isshow}}"> | 12 | <block wx:if="{{isshow}}"> |
| 13 | <view class="container"> | 13 | <view class="container"> |
| 14 | <!-- 幸运购规则 --> | 14 | <!-- 幸运购规则 --> |
| 15 | <view class="rules" bindtap="showRules">规则</view> | 15 | <view class="rules" bindtap="showRules">规则</view> |
| 16 | - <!-- tab选项卡 --> | ||
| 17 | - <view class="type-navbar" style="top:{{top_nav}}px"> | 16 | + |
| 17 | + <view class="type-navbar_box"> | ||
| 18 | + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1" | ||
| 19 | + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 20 | + </view> | ||
| 21 | + | ||
| 22 | + <!-- tab选项卡 --> | ||
| 23 | + <view class="type-navbar" style="top:{{top_nav-4}}px"> | ||
| 18 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | 24 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
| 19 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> | 25 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> |
| 20 | </view> | 26 | </view> |
| @@ -22,7 +28,6 @@ | @@ -22,7 +28,6 @@ | ||
| 22 | <!-- 商品详情 --> | 28 | <!-- 商品详情 --> |
| 23 | <view class="goods-detail"> | 29 | <view class="goods-detail"> |
| 24 | 30 | ||
| 25 | - | ||
| 26 | <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}"> | 31 | <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}"> |
| 27 | <!-- 幸运购中奖记录 --> | 32 | <!-- 幸运购中奖记录 --> |
| 28 | <view class="swiper-container"> | 33 | <view class="swiper-container"> |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
| @@ -3154,3 +3154,11 @@ button.custom-service::after{ | @@ -3154,3 +3154,11 @@ button.custom-service::after{ | ||
| 3154 | 3154 | ||
| 3155 | /*按钮变灰色的优化*/ | 3155 | /*按钮变灰色的优化*/ |
| 3156 | .spec-cart-btn.gray{ background-color:gainsboro !important; } | 3156 | .spec-cart-btn.gray{ background-color:gainsboro !important; } |
| 3157 | + | ||
| 3158 | +.type-navbar_box{ | ||
| 3159 | + position: fixed; | ||
| 3160 | + top: 0; | ||
| 3161 | + z-index: 999; | ||
| 3162 | + width: 100%; | ||
| 3163 | +} | ||
| 3164 | + |
packageC/pages/presell/cardInfo/goodsInfo.js
| @@ -216,7 +216,15 @@ Page({ | @@ -216,7 +216,15 @@ Page({ | ||
| 216 | keyword:'', //门店搜索 | 216 | keyword:'', //门店搜索 |
| 217 | sec_i:-1,//选中分类门店 下标 | 217 | sec_i:-1,//选中分类门店 下标 |
| 218 | 218 | ||
| 219 | - c_curr_p:1 | 219 | + c_curr_p:1, |
| 220 | + | ||
| 221 | + //-- 顶部导航的优化 -- | ||
| 222 | + nav_frontColor: "#ffffff", | ||
| 223 | + nav_backgroundColor: "#ffffff", | ||
| 224 | + nav_type: 2, //导航类型 | ||
| 225 | + istop: 0, //是否置顶风格为1 | ||
| 226 | + searchbox_transparent: 1 | ||
| 227 | + | ||
| 220 | }, | 228 | }, |
| 221 | 229 | ||
| 222 | //------初始化加载---------- | 230 | //------初始化加载---------- |
packageC/pages/presell/cardInfo/goodsInfo.json
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | "goods_recommend": "/components/goods_list/goods_list", | 7 | "goods_recommend": "/components/goods_list/goods_list", |
| 8 | "share": "/components/share/share", | 8 | "share": "/components/share/share", |
| 9 | "privacy_pop": "/components/privacy_pop/privacy_pop", | 9 | "privacy_pop": "/components/privacy_pop/privacy_pop", |
| 10 | - "com_top_nav": "/components/com_top_nav/com_top_nav" | 10 | + "top_nav": "/components/diy_top_nav/diy_top_nav" |
| 11 | }, | 11 | }, |
| 12 | "navigationStyle": "custom" | 12 | "navigationStyle": "custom" |
| 13 | } | 13 | } |
| 14 | \ No newline at end of file | 14 | \ No newline at end of file |
packageC/pages/presell/cardInfo/goodsInfo.wxml
| @@ -2,16 +2,21 @@ | @@ -2,16 +2,21 @@ | ||
| 2 | <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | 2 | <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> |
| 3 | <wxs module="g_filters" src="g_filter.wxs"></wxs> | 3 | <wxs module="g_filters" src="g_filter.wxs"></wxs> |
| 4 | <wxs module="tool" src="filter.wxs"></wxs> | 4 | <wxs module="tool" src="filter.wxs"></wxs> |
| 5 | - | ||
| 6 | -<com_top_nav title="{{data.goods_name}}"></com_top_nav> | ||
| 7 | - | 5 | +<!-- <com_top_nav title="{{data.goods_name}}"></com_top_nav> --> |
| 8 | <!-- 判断隐私是不是显示 --> | 6 | <!-- 判断隐私是不是显示 --> |
| 9 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> | 7 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> |
| 8 | +<!-- 顶开 --> | ||
| 9 | +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 10 | 10 | ||
| 11 | <block wx:if="{{show}}"> | 11 | <block wx:if="{{show}}"> |
| 12 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> | 12 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> |
| 13 | <view class="container"> | 13 | <view class="container"> |
| 14 | - <view class="type-navbar" style="top:{{top_nav}}px"> | 14 | + <!-- 自定义顶部的优化 --> |
| 15 | + <view class="type-navbar_box"> | ||
| 16 | + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1" | ||
| 17 | + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 18 | + </view> | ||
| 19 | + <view class="type-navbar" style="top:{{top_nav-4}}px"> | ||
| 15 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | 20 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
| 16 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | 21 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
| 17 | {{item.name}} | 22 | {{item.name}} |
packageC/pages/presell/cardInfo/goodsInfo.wxss
| @@ -3063,4 +3063,11 @@ button.custom-service::after{ | @@ -3063,4 +3063,11 @@ button.custom-service::after{ | ||
| 3063 | 3063 | ||
| 3064 | .c-red { | 3064 | .c-red { |
| 3065 | color: #f23030; | 3065 | color: #f23030; |
| 3066 | -} | ||
| 3067 | \ No newline at end of file | 3066 | \ No newline at end of file |
| 3067 | +} | ||
| 3068 | + | ||
| 3069 | +.type-navbar_box{ | ||
| 3070 | + position: fixed; | ||
| 3071 | + top: 0; | ||
| 3072 | + z-index: 999; | ||
| 3073 | + width: 100%; | ||
| 3074 | +} |
packageC/pages/presell/goodsInfo/goodsInfo.js
| @@ -263,7 +263,14 @@ Page({ | @@ -263,7 +263,14 @@ Page({ | ||
| 263 | sec_i:-1,//选中分类门店 下标 | 263 | sec_i:-1,//选中分类门店 下标 |
| 264 | goodInfo_ad:'',//商品详情广告 | 264 | goodInfo_ad:'',//商品详情广告 |
| 265 | 265 | ||
| 266 | - c_curr_p:1 | 266 | + c_curr_p:1, |
| 267 | + | ||
| 268 | + nav_frontColor: "#ffffff", | ||
| 269 | + nav_backgroundColor: "#ffffff", | ||
| 270 | + nav_type: 2, //导航类型 | ||
| 271 | + istop: 0, //是否置顶风格为1 | ||
| 272 | + searchbox_transparent: 1 | ||
| 273 | + | ||
| 267 | }, | 274 | }, |
| 268 | 275 | ||
| 269 | //------初始化加载---------- | 276 | //------初始化加载---------- |
packageC/pages/presell/goodsInfo/goodsInfo.json
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | "goods_recommend": "/components/goods_list/goods_list", | 7 | "goods_recommend": "/components/goods_list/goods_list", |
| 8 | "share": "/components/share/share", | 8 | "share": "/components/share/share", |
| 9 | "privacy_pop": "/components/privacy_pop/privacy_pop", | 9 | "privacy_pop": "/components/privacy_pop/privacy_pop", |
| 10 | - "com_top_nav": "/components/com_top_nav/com_top_nav" | 10 | + "top_nav": "/components/diy_top_nav/diy_top_nav" |
| 11 | }, | 11 | }, |
| 12 | "navigationStyle": "custom" | 12 | "navigationStyle": "custom" |
| 13 | } | 13 | } |
| 14 | \ No newline at end of file | 14 | \ No newline at end of file |
packageC/pages/presell/goodsInfo/goodsInfo.wxml
| 1 | -<com_top_nav title="{{gtitle}}"></com_top_nav> | 1 | +<!-- <com_top_nav title="{{gtitle}}"></com_top_nav> --> |
| 2 | <import src="../../../../utils/wxParse/wxParse.wxml"></import> | 2 | <import src="../../../../utils/wxParse/wxParse.wxml"></import> |
| 3 | <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | 3 | <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> |
| 4 | <wxs module="g_filters" src="g_filter.wxs"></wxs> | 4 | <wxs module="g_filters" src="g_filter.wxs"></wxs> |
| @@ -6,11 +6,20 @@ | @@ -6,11 +6,20 @@ | ||
| 6 | 6 | ||
| 7 | <!-- 判断隐私是不是显示 --> | 7 | <!-- 判断隐私是不是显示 --> |
| 8 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> | 8 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> |
| 9 | +<!-- 顶开 --> | ||
| 10 | +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 11 | + | ||
| 9 | 12 | ||
| 10 | <block wx:if="{{show}}"> | 13 | <block wx:if="{{show}}"> |
| 11 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> | 14 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> |
| 12 | <view class="container"> | 15 | <view class="container"> |
| 13 | - <view class="type-navbar" style="top:{{top_nav}}px"> | 16 | + <!-- 自定义顶部的优化 --> |
| 17 | + <view class="type-navbar_box"> | ||
| 18 | + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1" | ||
| 19 | + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 20 | + </view> | ||
| 21 | + | ||
| 22 | + <view class="type-navbar" style="top:{{top_nav-4}}px"> | ||
| 14 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | 23 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
| 15 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | 24 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
| 16 | {{item.name}} | 25 | {{item.name}} |
packageC/pages/presell/goodsInfo/goodsInfo.wxss
| @@ -3019,3 +3019,10 @@ button.custom-service::after{ | @@ -3019,3 +3019,10 @@ button.custom-service::after{ | ||
| 3019 | .c-red22{ | 3019 | .c-red22{ |
| 3020 | color: #d60021 | 3020 | color: #d60021 |
| 3021 | } | 3021 | } |
| 3022 | + | ||
| 3023 | +.type-navbar_box{ | ||
| 3024 | + position: fixed; | ||
| 3025 | + top: 0; | ||
| 3026 | + z-index: 999; | ||
| 3027 | + width: 100%; | ||
| 3028 | +} |
packageE/pages/cart/cart2/cart2.js
| @@ -510,14 +510,75 @@ Page({ | @@ -510,14 +510,75 @@ Page({ | ||
| 510 | let goods = item.goods | 510 | let goods = item.goods |
| 511 | let keyid = item.sto.keyid | 511 | let keyid = item.sto.keyid |
| 512 | let listform = [] | 512 | let listform = [] |
| 513 | - goods.map(ite => { | ||
| 514 | - let obj = { | ||
| 515 | - wareno: ite.goods_sn, | ||
| 516 | - price: ite.goods_price, | ||
| 517 | - qty: ite.goods_num | 513 | + |
| 514 | + //-- 如果有订单优惠的时候,就要进行第二次平摊,要用实收来判断满 -- | ||
| 515 | + if (cartList.order_prom_amount > 0) { | ||
| 516 | + let new_arr = []; | ||
| 517 | + //--- 预存要以商品的实收为准, --- | ||
| 518 | + goods.map(ite => { | ||
| 519 | + //-- 不是赠品的时候 -- | ||
| 520 | + if(!ite.is_gift){ | ||
| 521 | + let obj = { | ||
| 522 | + goods_sn:ite.goods_sn, | ||
| 523 | + goods_id: ite.goods_id, | ||
| 524 | + goods_price: ite.goods_price, //account是平摊后的实收价格 | ||
| 525 | + goods_num: ite.goods_num, | ||
| 526 | + sumgoods_price: ite.account_fir * ite.goods_num - ite.account_yu_fir-(ite.quan_num?ite.quan_num:0) //-- 优惠后的实收 -- | ||
| 527 | + } | ||
| 528 | + new_arr.push(obj); | ||
| 529 | + } | ||
| 530 | + | ||
| 531 | + }) | ||
| 532 | + | ||
| 533 | + //-- 如果系统要平摊到单品 -- | ||
| 534 | + var pt_data = { | ||
| 535 | + 'prom_id': 1, | ||
| 536 | + 'dis': cartList.order_prom_amount, | ||
| 537 | + 'goods': new_arr | ||
| 518 | } | 538 | } |
| 519 | - listform.push(obj) | ||
| 520 | - }) | 539 | + var pt_res = null; |
| 540 | + await getApp().request.promisePost("/api/weshop/order/getGoodsSplit", { | ||
| 541 | + is_json: 1, | ||
| 542 | + data: pt_data | ||
| 543 | + }).then(res => { | ||
| 544 | + if (res.data.code == 0) { | ||
| 545 | + pt_res = res.data.data; | ||
| 546 | + } | ||
| 547 | + }) | ||
| 548 | + if (pt_res) { | ||
| 549 | + for (let io = 0; io <new_arr.length ; io++) { | ||
| 550 | + new_arr[io].account_yc = this.arr_get_goods(new_arr[io].goods_id, pt_res).fisrt_account; | ||
| 551 | + new_arr[io].account_yc_yu = this.arr_get_goods(new_arr[io].goods_id, pt_res).fisrt_account_yu; | ||
| 552 | + } | ||
| 553 | + } | ||
| 554 | + | ||
| 555 | + new_arr.map(ite => { | ||
| 556 | + let obj = { | ||
| 557 | + wareno: ite.goods_sn, | ||
| 558 | + price: ite.account_yc, //account是平摊后的实收价格 | ||
| 559 | + qty: ite.goods_num, | ||
| 560 | + sumprice: parseFloat(ite.account_yc * ite.goods_num - ite.account_yc_yu).toFixed(2) | ||
| 561 | + } | ||
| 562 | + listform.push(obj) | ||
| 563 | + }) | ||
| 564 | + } | ||
| 565 | + else{ | ||
| 566 | + goods.map(ite => { | ||
| 567 | + //-- 不是赠品的时候 -- | ||
| 568 | + if(!ite.is_gift) { | ||
| 569 | + let obj = { | ||
| 570 | + wareno: ite.goods_sn, | ||
| 571 | + price: ite.first_account, //account是平摊后的实收价格 | ||
| 572 | + qty: ite.goods_num, | ||
| 573 | + sumprice: parseFloat(ite.account_fir * ite.goods_num - ite.account_yu_fir-(ite.quan_num?ite.quan_num:0)).toFixed(2) | ||
| 574 | + } | ||
| 575 | + listform.push(obj) | ||
| 576 | + } | ||
| 577 | + }) | ||
| 578 | + | ||
| 579 | + } | ||
| 580 | + | ||
| 581 | + | ||
| 521 | let arr = await this.getGoodsAdvancesum(keyid, listform, cartList) | 582 | let arr = await this.getGoodsAdvancesum(keyid, listform, cartList) |
| 522 | // } | 583 | // } |
| 523 | wx.hideLoading() | 584 | wx.hideLoading() |
packageE/pages/user/labels/labels.js
| @@ -120,7 +120,7 @@ Page({ | @@ -120,7 +120,7 @@ Page({ | ||
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | if(options.is_reg){ | 122 | if(options.is_reg){ |
| 123 | - this.data.is_reg=1; | 123 | + this.setData({is_reg:1}) |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | th.query_nolabels(); | 126 | th.query_nolabels(); |
| @@ -312,12 +312,12 @@ Page({ | @@ -312,12 +312,12 @@ Page({ | ||
| 312 | }, | 312 | }, |
| 313 | failStatus: function (t) { | 313 | failStatus: function (t) { |
| 314 | wx.hideLoading(); | 314 | wx.hideLoading(); |
| 315 | - th.setData({loading: 0}); | 315 | + th.setData({loading: 0,is_check:0}); |
| 316 | return app.my_warnning("授权登入失败,请稍后再试!", 0, that); | 316 | return app.my_warnning("授权登入失败,请稍后再试!", 0, that); |
| 317 | }, | 317 | }, |
| 318 | fail: function (t) { | 318 | fail: function (t) { |
| 319 | wx.hideLoading(); | 319 | wx.hideLoading(); |
| 320 | - th.setData({loading: 0}); | 320 | + th.setData({loading: 0,is_check:0}); |
| 321 | return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; | 321 | return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; |
| 322 | } | 322 | } |
| 323 | }); | 323 | }); |
| @@ -416,5 +416,54 @@ Page({ | @@ -416,5 +416,54 @@ Page({ | ||
| 416 | */ | 416 | */ |
| 417 | onShow: function() { | 417 | onShow: function() { |
| 418 | 418 | ||
| 419 | + }, | ||
| 420 | + | ||
| 421 | + //会员点击了跳过,就要注册 | ||
| 422 | + goto_user(e){ | ||
| 423 | + var th=this; | ||
| 424 | + if(this.data.is_check) return false; | ||
| 425 | + wx.showLoading({ | ||
| 426 | + title: "处理中.", | ||
| 427 | + mask: true | ||
| 428 | + }) | ||
| 429 | + | ||
| 430 | + this.setData({ is_check: 1 }) | ||
| 431 | + | ||
| 432 | + app.request.get("/api/weshop/users/thirdLogin", { | ||
| 433 | + data: getApp().globalData.zc_dd, | ||
| 434 | + success: function (e) { | ||
| 435 | + wx.hideLoading(); | ||
| 436 | + if (e.data.code == 0) { | ||
| 437 | + app.globalData.user_id = e.data.data.user_id; | ||
| 438 | + } else { | ||
| 439 | + return app.showWarning("授权登入失败!" + e.data.msg); | ||
| 440 | + } | ||
| 441 | + getApp().globalData.login_back = 1; | ||
| 442 | + wx.setStorageSync("userinfo", e.data.data); | ||
| 443 | + wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = s.getFullUrl(app.globalData.userInfo.head_pic); | ||
| 444 | + | ||
| 445 | + //-- 注册的跳转 -- | ||
| 446 | + getApp().go_to_page(th.data.is_reg,function (){ | ||
| 447 | + // wx.navigateBack({ delta: 1 }) | ||
| 448 | + wx.reLaunch({ | ||
| 449 | + url: '/pages/user/index/index', | ||
| 450 | + }) | ||
| 451 | + }) | ||
| 452 | + | ||
| 453 | + }, | ||
| 454 | + failStatus: function (t) { | ||
| 455 | + wx.hideLoading(); | ||
| 456 | + th.setData({loading: 0,is_check:0}); | ||
| 457 | + return app.my_warnning("授权登入失败,请稍后再试!", 0, that); | ||
| 458 | + }, | ||
| 459 | + fail: function (t) { | ||
| 460 | + wx.hideLoading(); | ||
| 461 | + th.setData({loading: 0,is_check:0}); | ||
| 462 | + return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; | ||
| 463 | + } | ||
| 464 | + }); | ||
| 465 | + | ||
| 466 | + | ||
| 419 | } | 467 | } |
| 468 | + | ||
| 420 | }) | 469 | }) |
| 421 | \ No newline at end of file | 470 | \ No newline at end of file |
packageE/pages/user/labels/labels.wxml
| @@ -4,9 +4,20 @@ | @@ -4,9 +4,20 @@ | ||
| 4 | <!-- 兴趣标签标题 --> | 4 | <!-- 兴趣标签标题 --> |
| 5 | <view class="flex-vertical-between labels_head"> | 5 | <view class="flex-vertical-between labels_head"> |
| 6 | <view class="fs36">兴趣标签</view> | 6 | <view class="fs36">兴趣标签</view> |
| 7 | - <view class="skip flex-center fs28" data-url="/pages/user/userinfo/userinfo" bindtap="goto"> | ||
| 8 | - <view>关闭</view> | ||
| 9 | - </view> | 7 | + |
| 8 | + <!-- 如果是注册的时候 --> | ||
| 9 | + <block wx:if="{{is_reg }}"> | ||
| 10 | + <view wx:if="{{!label_required}}" class="skip flex-center fs28" data-url="/pages/user/userinfo/userinfo" bindtap="goto_user"> | ||
| 11 | + <view>跳过</view> | ||
| 12 | + </view> | ||
| 13 | + </block> | ||
| 14 | + <block wx:else> | ||
| 15 | + <view class="skip flex-center fs28" data-url="/pages/user/userinfo/userinfo" bindtap="goto"> | ||
| 16 | + <view>关闭</view> | ||
| 17 | + </view> | ||
| 18 | + </block> | ||
| 19 | + | ||
| 20 | + | ||
| 10 | 21 | ||
| 11 | </view> | 22 | </view> |
| 12 | 23 |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.json
| @@ -5,6 +5,8 @@ | @@ -5,6 +5,8 @@ | ||
| 5 | "my_confirm": "/components/my_confirm/my_confirm", | 5 | "my_confirm": "/components/my_confirm/my_confirm", |
| 6 | "qr_code": "/components/qr_code/qr_code", | 6 | "qr_code": "/components/qr_code/qr_code", |
| 7 | "nav_b": "/components/nav_b/nav_b", | 7 | "nav_b": "/components/nav_b/nav_b", |
| 8 | - "share": "/components/share/share" | ||
| 9 | - } | 8 | + "share": "/components/share/share", |
| 9 | + "com_top_nav": "/components/com_top_nav/com_top_nav" | ||
| 10 | + }, | ||
| 11 | + "navigationStyle": "custom" | ||
| 10 | } | 12 | } |
| 11 | \ No newline at end of file | 13 | \ No newline at end of file |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml
| 1 | +<com_top_nav title="礼包详情"></com_top_nav> | ||
| 1 | <wxs module="filter" src="../../../../../utils/filter.wxs"></wxs> | 2 | <wxs module="filter" src="../../../../../utils/filter.wxs"></wxs> |
| 2 | <view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}};min-height: 100vh;"> | 3 | <view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}};min-height: 100vh;"> |
| 3 | <view class="box_top data-v-3a5b7e36"> | 4 | <view class="box_top data-v-3a5b7e36"> |
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.json
| @@ -5,6 +5,8 @@ | @@ -5,6 +5,8 @@ | ||
| 5 | "my_confirm": "/components/my_confirm/my_confirm", | 5 | "my_confirm": "/components/my_confirm/my_confirm", |
| 6 | "qr_code": "/components/qr_code/qr_code", | 6 | "qr_code": "/components/qr_code/qr_code", |
| 7 | "nav_b": "/components/nav_b/nav_b", | 7 | "nav_b": "/components/nav_b/nav_b", |
| 8 | - "share": "/components/share/share" | ||
| 9 | - } | 8 | + "share": "/components/share/share", |
| 9 | + "com_top_nav": "/components/com_top_nav/com_top_nav" | ||
| 10 | + }, | ||
| 11 | + "navigationStyle": "custom" | ||
| 10 | } | 12 | } |
| 11 | \ No newline at end of file | 13 | \ No newline at end of file |
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxml
| 1 | +<com_top_nav title="礼包详情"></com_top_nav> | ||
| 2 | + | ||
| 1 | <view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}}"> | 3 | <view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}}"> |
| 2 | <view class="box_top data-v-3a5b7e36"> | 4 | <view class="box_top data-v-3a5b7e36"> |
| 3 | <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr" data-errorimg="giftImage"></image> | 5 | <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr" data-errorimg="giftImage"></image> |
packageE/pages/user/monthgiftbag/monthgiftbag.wxml
| @@ -66,6 +66,10 @@ | @@ -66,6 +66,10 @@ | ||
| 66 | <block wx:if="{{item.payIntegral>0}}"> | 66 | <block wx:if="{{item.payIntegral>0}}"> |
| 67 | <text>{{item.payIntegral+"积分"}}</text> | 67 | <text>{{item.payIntegral+"积分"}}</text> |
| 68 | </block> | 68 | </block> |
| 69 | + | ||
| 70 | + | ||
| 71 | + <!-- (121658)OA单规定取消,2023-12-15 --> | ||
| 72 | + <!-- | ||
| 69 | <block wx:if="{{item.actType==1}}"> | 73 | <block wx:if="{{item.actType==1}}"> |
| 70 | <text>{{item.actTitle}}</text> | 74 | <text>{{item.actTitle}}</text> |
| 71 | </block> | 75 | </block> |
| @@ -80,7 +84,9 @@ | @@ -80,7 +84,9 @@ | ||
| 80 | </block> | 84 | </block> |
| 81 | <block wx:if="{{item.actType==5}}"> | 85 | <block wx:if="{{item.actType==5}}"> |
| 82 | <text>{{item.actTitle}}</text> | 86 | <text>{{item.actTitle}}</text> |
| 83 | - </block> | 87 | + </block>--> |
| 88 | + | ||
| 89 | + | ||
| 84 | </view> | 90 | </view> |
| 85 | <view class="content_ware_price no_line_c"> | 91 | <view class="content_ware_price no_line_c"> |
| 86 | <text >{{"购买时间:"+item.pay_time}}</text> | 92 | <text >{{"购买时间:"+item.pay_time}}</text> |
pages/giftpack/mygiftpack/mygiftpack.wxml
| @@ -63,6 +63,9 @@ | @@ -63,6 +63,9 @@ | ||
| 63 | <block wx:if="{{item.actType==0&item.payIntegral>0}}"> | 63 | <block wx:if="{{item.actType==0&item.payIntegral>0}}"> |
| 64 | <text>{{item.payIntegral+"积分"}}</text> | 64 | <text>{{item.payIntegral+"积分"}}</text> |
| 65 | </block> | 65 | </block> |
| 66 | + | ||
| 67 | + <!-- (121658)OA单规定取消,2023-12-15 --> | ||
| 68 | + <!-- | ||
| 66 | <block wx:if="{{item.actType==1}}"> | 69 | <block wx:if="{{item.actType==1}}"> |
| 67 | <text>{{item.actTitle}}</text> | 70 | <text>{{item.actTitle}}</text> |
| 68 | </block> | 71 | </block> |
| @@ -77,7 +80,8 @@ | @@ -77,7 +80,8 @@ | ||
| 77 | </block> | 80 | </block> |
| 78 | <block wx:if="{{item.actType==5}}"> | 81 | <block wx:if="{{item.actType==5}}"> |
| 79 | <text>{{item.actTitle}}</text> | 82 | <text>{{item.actTitle}}</text> |
| 80 | - </block> | 83 | + </block>--> |
| 84 | + | ||
| 81 | </view> | 85 | </view> |
| 82 | <view class="content_ware_price no_line_c"> | 86 | <view class="content_ware_price no_line_c"> |
| 83 | <text >{{"零售价:¥"+item.giftPosPrice}}</text> | 87 | <text >{{"零售价:¥"+item.giftPosPrice}}</text> |
pages/goods/goodsInfo/goodsInfo.js
| @@ -278,6 +278,13 @@ Page({ | @@ -278,6 +278,13 @@ Page({ | ||
| 278 | 278 | ||
| 279 | adding:0 , //加入购物车的避免重复 | 279 | adding:0 , //加入购物车的避免重复 |
| 280 | goodInfo_ad:"",//商品详情广告 | 280 | goodInfo_ad:"",//商品详情广告 |
| 281 | + | ||
| 282 | + nav_frontColor: "#ffffff", | ||
| 283 | + nav_backgroundColor: "#ffffff", | ||
| 284 | + nav_type: 2, //导航类型 | ||
| 285 | + istop: 0, //是否置顶风格为1 | ||
| 286 | + searchbox_transparent: 1, | ||
| 287 | + | ||
| 281 | }, | 288 | }, |
| 282 | 289 | ||
| 283 | //------初始化加载---------- | 290 | //------初始化加载---------- |
| @@ -1328,6 +1335,13 @@ Page({ | @@ -1328,6 +1335,13 @@ Page({ | ||
| 1328 | this.setData({ | 1335 | this.setData({ |
| 1329 | activeCategoryId: e | 1336 | activeCategoryId: e |
| 1330 | }), 1 == e ? this.tabGoodsContent() : 2 == e && this.tabComment(); | 1337 | }), 1 == e ? this.tabGoodsContent() : 2 == e && this.tabComment(); |
| 1338 | + | ||
| 1339 | + if(e>0){ | ||
| 1340 | + wx.pageScrollTo({ | ||
| 1341 | + scrollTop:0 | ||
| 1342 | + }) | ||
| 1343 | + } | ||
| 1344 | + | ||
| 1331 | }, | 1345 | }, |
| 1332 | tabClick2: function (t) { | 1346 | tabClick2: function (t) { |
| 1333 | this.setData({ | 1347 | this.setData({ |
| @@ -1371,6 +1385,7 @@ Page({ | @@ -1371,6 +1385,7 @@ Page({ | ||
| 1371 | activeCategoryId: 1 | 1385 | activeCategoryId: 1 |
| 1372 | }); | 1386 | }); |
| 1373 | 1387 | ||
| 1388 | + | ||
| 1374 | if (th.data.cat_name == '') { | 1389 | if (th.data.cat_name == '') { |
| 1375 | //过去国别,分类,品牌的名称 | 1390 | //过去国别,分类,品牌的名称 |
| 1376 | i.get("/api/weshop/goodscategory/get/" + o.stoid + "/" + th.data.data.cat_id, { | 1391 | i.get("/api/weshop/goodscategory/get/" + o.stoid + "/" + th.data.data.cat_id, { |
| @@ -9054,4 +9069,31 @@ Page({ | @@ -9054,4 +9069,31 @@ Page({ | ||
| 9054 | }, | 9069 | }, |
| 9055 | 9070 | ||
| 9056 | 9071 | ||
| 9072 | + //滚动监听 | ||
| 9073 | + onPageScroll(e) { | ||
| 9074 | + this.on_menu_list() | ||
| 9075 | + if (this.data.istop) { | ||
| 9076 | + let num = e.scrollTop | ||
| 9077 | + if (num >= 100) { | ||
| 9078 | + this.setData({ | ||
| 9079 | + searchbox_transparent: 0 | ||
| 9080 | + }) | ||
| 9081 | + } | ||
| 9082 | + if (num < 100) { | ||
| 9083 | + this.setData({ | ||
| 9084 | + searchbox_transparent: 1 | ||
| 9085 | + }) | ||
| 9086 | + } | ||
| 9087 | + } | ||
| 9088 | + }, | ||
| 9089 | + | ||
| 9090 | + | ||
| 9091 | + //隐藏导航下拉菜单 | ||
| 9092 | + on_menu_list() { | ||
| 9093 | + let child = this.selectComponent('#my-nav'); | ||
| 9094 | + child.hide_menu_fn() | ||
| 9095 | + }, | ||
| 9096 | + | ||
| 9097 | + | ||
| 9098 | + | ||
| 9057 | }) | 9099 | }) |
| 9058 | \ No newline at end of file | 9100 | \ No newline at end of file |
pages/goods/goodsInfo/goodsInfo.json
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | "share": "/components/share/share", | 8 | "share": "/components/share/share", |
| 9 | "pro_pop": "/components/promate_pop/promate_pop", | 9 | "pro_pop": "/components/promate_pop/promate_pop", |
| 10 | "privacy_pop": "/components/privacy_pop/privacy_pop", | 10 | "privacy_pop": "/components/privacy_pop/privacy_pop", |
| 11 | - "com_top_nav": "/components/com_top_nav/com_top_nav" | 11 | + "top_nav": "/components/diy_top_nav/diy_top_nav" |
| 12 | }, | 12 | }, |
| 13 | "navigationStyle": "custom" | 13 | "navigationStyle": "custom" |
| 14 | } | 14 | } |
| 15 | \ No newline at end of file | 15 | \ No newline at end of file |
pages/goods/goodsInfo/goodsInfo.wxml
| 1 | -<com_top_nav title="{{gtitle}}"></com_top_nav> | 1 | +<!-- 顶部的优化 --> |
| 2 | +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 2 | 3 | ||
| 3 | <!-- 判断隐私是不是显示 --> | 4 | <!-- 判断隐私是不是显示 --> |
| 4 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> | 5 | <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> |
| @@ -15,11 +16,19 @@ | @@ -15,11 +16,19 @@ | ||
| 15 | <view class="container"> | 16 | <view class="container"> |
| 16 | <!-- 拼单规则规则 --> | 17 | <!-- 拼单规则规则 --> |
| 17 | <view wx:if="{{prom_type== 6}}" class="rules" bindtap="showRules">规则</view> | 18 | <view wx:if="{{prom_type== 6}}" class="rules" bindtap="showRules">规则</view> |
| 18 | - <view class="type-navbar" style="top:{{top_nav}}px"> | 19 | + |
| 20 | + <view class="type-navbar_box"> | ||
| 21 | + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1" | ||
| 22 | + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | ||
| 23 | + </view> | ||
| 24 | + | ||
| 25 | + <view class="type-navbar" style="top:{{top_nav-4}}px" wx:if="{{activeCategoryId>0 || !istop || ( istop && !searchbox_transparent)}}" > | ||
| 19 | <view class="type-box" wx:for="{{categories}}" wx:key="id"> | 26 | <view class="type-box" wx:for="{{categories}}" wx:key="id"> |
| 20 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> | 27 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> |
| 21 | </view> | 28 | </view> |
| 22 | </view> | 29 | </view> |
| 30 | + | ||
| 31 | + | ||
| 23 | <view class="goods-detail"> | 32 | <view class="goods-detail"> |
| 24 | <view class="goods-info" style="position: relative;" hidden="{{activeCategoryId==0?false:true}}"> | 33 | <view class="goods-info" style="position: relative;" hidden="{{activeCategoryId==0?false:true}}"> |
| 25 | 34 |
pages/goods/goodsInfo/goodsInfo.wxss
| @@ -4046,4 +4046,10 @@ button.custom-service::after { | @@ -4046,4 +4046,10 @@ button.custom-service::after { | ||
| 4046 | } | 4046 | } |
| 4047 | 4047 | ||
| 4048 | /*按钮变灰色的优化*/ | 4048 | /*按钮变灰色的优化*/ |
| 4049 | -.spec-cart-btn.gray{ background-color:gainsboro !important; } | ||
| 4050 | \ No newline at end of file | 4049 | \ No newline at end of file |
| 4050 | +.spec-cart-btn.gray{ background-color:gainsboro !important; } | ||
| 4051 | +.type-navbar_box{ | ||
| 4052 | + position: fixed; | ||
| 4053 | + top: 0; | ||
| 4054 | + z-index: 9999; | ||
| 4055 | + width: 100%; | ||
| 4056 | +} |