准备加等级判断

This commit is contained in:
lym
2026-03-23 13:16:56 +08:00
parent 819116078b
commit 14eee2489c
12 changed files with 82 additions and 25 deletions

View File

@@ -59,7 +59,7 @@ Page( {
})
if(res.data.ttype==0){
that.setData({
cart_Total:"兑换券"+res.data.ZSubTotal
cart_Total:""+res.data.ZSubTotal
})
}
if(res.data.productlist.length>0){
@@ -199,8 +199,8 @@ Page( {
that.setData({
ttype:res.data.ttype,
cartproducts:res.data.productlist,
cart_Total:(res.data.ttype==1?"¥":"")+res.data.ZSubTotal+(res.data.ttype==0?"积分":"")
// cart_Total:(res.data.ttype==1?"¥":"")+res.data.ZSubTotal+(res.data.ttype==0?"¥":"")
cart_Total:("¥")+res.data.ZSubTotal+(res.data.ttype==0?"¥":"")
})
if(res.data.productlist.length>0){
that.setData({
@@ -252,8 +252,8 @@ Page( {
that.setData({
ttype:res.data.ttype,
cartproducts:res.data.productlist,
cart_Total:(res.data.ttype==1?"¥":"")+res.data.ZSubTotal+(res.data.ttype==0?"积分":"")
// cart_Total:(res.data.ttype==1?"¥":"")+res.data.ZSubTotal+(res.data.ttype==0?"":"")
cart_Total:("¥")+res.data.ZSubTotal+(res.data.ttype==0?"":"")
})
if(res.data.productlist.length>0){
that.setData({

View File

@@ -7,8 +7,8 @@
<view class="rname">
<view class="prodName" bindtap="gotodetail" data-id="{{item.prodid}}">{{item.prodName}} {{item.selcolor}}
</view>
<view class="je">单价:<text>{{ttype==0?"兑换券":"¥"}}{{item.prodPrice}}</text> 小计:
<text>{{ttype==0?"兑换券":"¥"}}{{item.SubTotal}}</text>
<view class="je">单价:<text>{{ttype==0?"金额":"¥"}}{{item.prodPrice}}</text> 小计:
<text>{{ttype==0?"金额":"¥"}}{{item.SubTotal}}</text>
</view>
<view class="tnum">
<view class="input_del" bindtap="updatenum" data-id="2:{{item.id}}:{{index}}"></view>

View File

@@ -455,9 +455,10 @@ Page({
wx.navigateTo({
url: "../login/index"
})
return;
}else{
var userInfo = JSON.parse(userInfodata);
if(userInfo.Phone==""&&userInfo.FHEnable4=="0"){
var userInfo = userInfodata ? JSON.parse(userInfodata) : null;
if(userInfo && userInfo.Phone==""&&userInfo.FHEnable4=="0"){
ifdl=false;
wx.showToast({
title: "您还没有绑定手机号",
@@ -492,6 +493,16 @@ Page({
}
},
addcart:function(e) {
var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId")
if(!userId||!LoginId){
wx.navigateTo({
url: "../login/index"
})
return;
}
var t = e.currentTarget.dataset.id
that.setData({
IFDJPD:0,
@@ -530,9 +541,10 @@ Page({
wx.navigateTo({
url: "../login/index"
})
return;
}else{
var userInfo = JSON.parse(userInfodata);
if(userInfo.Phone==""&&userInfo.FHEnable4=="0"){
var userInfo = userInfodata ? JSON.parse(userInfodata) : null;
if(userInfo && userInfo.Phone==""&&userInfo.FHEnable4=="0"){
ifdl=false;
wx.showToast({
title: "您还没有绑定手机号",
@@ -960,10 +972,11 @@ Page({
var userInfodata = wx.getStorageSync("userInfo")
var bb=true;
if(!userId||!LoginId){
ifdl=false;
bb=false;
wx.navigateTo({
url: "../login/index"
})
return;
}else{
/* var userInfo = JSON.parse(userInfodata);
if(userInfo.Phone==""&&userInfo.FHEnable4=="0"){
@@ -1030,6 +1043,14 @@ Page({
if(bb){
var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId")
if(!userId||!LoginId){
wx.navigateTo({
url: "../login/index"
})
return;
}
var CartId = wx.getStorageSync("CartId")
that.setData({
qyaddcart:"请稍候..."
@@ -1095,6 +1116,21 @@ Page({
icon: "none",
duration: 2000
})
// 处理登录错误
if(res.data.msg && res.data.msg.indexOf("登录有误") > -1){
// 清除登录状态
wx.removeStorageSync('userId');
wx.removeStorageSync('LoginId');
wx.removeStorageSync('userInfo');
// 跳转到登录页面
setTimeout(function(){
wx.navigateTo({
url: "../login/index"
});
}, 1000);
}
}
}

View File

@@ -110,7 +110,7 @@
<view class="selguige_box" wx:for="{{selguiges}}">
<view class="selguige_item {{(item.selectednum>0?'hover':'')}}" data-id="{{index}}">
<view class="select_name">{{item.gg}}<view>{{fromHot==1?'会员价:':'兑换券:'}}{{(ttype==6 && addtype==0)?item.jg2:item.jg}}</view><!--<view>金豆:{{item.jg0}}</view>--></view>
<view class="select_name">{{item.gg}}<view>{{fromHot==1?'会员价:':'会员价'}}{{(ttype==6 && addtype==0)?item.jg2:item.jg}}</view><!--<view>金豆:{{item.jg0}}</view>--></view>
<view class="select_colors" wx:if='{{item.colors!=""}}' bindtap="showcolor" data-id="{{index}}">
<view>{{item.selectedcolor==""?"选择颜色":item.selectedcolor}}</view>
</view>

View File

@@ -181,7 +181,7 @@ Page({
ttype=res.data.ttype
that.setData({
oldpricetitle:"零售价:",
currenttitle:"兑换券:",
currenttitle:"会员价",
currentprice:res.data.hyje,
currentprice0:res.data.hyje0
})

View File

@@ -110,7 +110,7 @@
<view class="selguige_box" wx:for="{{selguiges}}">
<view class="selguige_item {{(item.selectednum>0?'hover':'')}}" data-id="{{index}}">
<view class="select_name">{{item.gg}}<view>兑换券{{(ttype==6 && addtype==0)?item.jg2:item.jg}}</view><!--<view>金豆:{{item.jg0}}</view>--></view>
<view class="select_name">{{item.gg}}<view>零售价{{(ttype==6 && addtype==0)?item.jg2:item.jg}}</view><!--<view>金豆:{{item.jg0}}</view>--></view>
<view class="select_colors" wx:if='{{item.colors!=""}}' bindtap="showcolor" data-id="{{index}}">
<view>{{item.selectedcolor==""?"选择颜色":item.selectedcolor}}</view>
</view>

View File

@@ -157,7 +157,7 @@
<view class="title">{{cell.name}}</view>
<view class="je">
<view class="jeto jeto0">
<view class="viphyj">兑换券<text>{{cell.hyje}}</text></view>
<view class="viphyj">会员价<text>{{cell.hyje}}</text></view>
</view>
</view>
</view>

View File

@@ -87,9 +87,11 @@ Page( {
var area=that.data.myaddress[index].area
var detail=that.data.myaddress[index].detail
var Province=that.data.myaddress[index].Province
var City=that.data.myaddress[index].City
var County=that.data.myaddress[index].County
var qygm = wx.getStorageSync("qygm")
if(qygm){
app.globalData.selladdress={id:id,contact:contact,tel:tel,address:area+detail,Province:Province}
app.globalData.selladdress={id:id,contact:contact,tel:tel,address:area+detail,Province:Province,City:City,County:County}
app.globalData.IFRefreshsell=1
wx.removeStorageSync('qygm')
wx.navigateBack({})

View File

@@ -37,7 +37,7 @@ Page( {
ttype:0,
IFFQPT:0,
FHEnable2:"0",
zftype:2,
zftype:0,
kjpay:0,
peitype:0,
p_peitype:0,
@@ -117,6 +117,25 @@ Page( {
app.globalData.IFRefreshsell1=0
}
}, 1000);
},
onShow: function() {
if(app.globalData.IFRefreshsell==1){
var id=app.globalData.selladdress.id
var contact=app.globalData.selladdress.contact
var tel=app.globalData.selladdress.tel
var address=app.globalData.selladdress.address
that.setData({
addressId:id,
contact:contact,
phone:tel,
province:app.globalData.selladdress.Province,
city:app.globalData.selladdress.City,
county:app.globalData.selladdress.County,
address:address
})
app.globalData.IFRefreshsell=0
that.getyunfei(app.globalData.selladdress.Province)
}
},onPullDownRefresh: function () {
//在当前页面显示导航条加载动画
wx.showNavigationBarLoading();
@@ -175,7 +194,7 @@ Page( {
distance0:(res.data.addresss.length>0?res.data.addresss[0].distance:""),
agentid:(res.data.addresss.length>0?res.data.addresss[0].addressId:0),
agenttype:(res.data.addresss.length>0?res.data.addresss[0].type:0),
zftype:(res.data.ttype==0?1:2) // 当ttype==0时默认选择兑换券抵扣
zftype:(res.data.ttype) // 当ttype==0时默认选择兑换券抵扣
})
@@ -312,7 +331,7 @@ Page( {
})
if(that.data.ttype==0){
that.setData({
cart_Total:""+app.changeTwoDecimal_f(cart_Total)
cart_Total:""+app.changeTwoDecimal_f(cart_Total)
})
}
},onaddpic1:function(e) {

View File

@@ -55,19 +55,19 @@
<view wx:if="{{ttype==0||ttype==2||ttype==4||ttype==5||ttype==8||ttype==9||ttype==10||ttype==11||ttype==12||ttype==13||ttype==14}}" class='{{zftype==2?"hover":""}}' bindtap="onpay" data-id="2"><image src="../../images/weixinpay.png"/>微信支付</view>
<view wx:if="{{ttype==0||ttype==2||ttype==4||ttype==5||ttype==8||ttype==9||ttype==10||ttype==11||ttype==12||ttype==13||ttype==14}}" class='{{zftype==0?"hover":""}}' bindtap="onpay" data-id="0"><image src="../../images/jianjinpay.png"/>余额抵扣</view>
<view wx:if="{{ttype==0}}" class='{{zftype==1?"hover":""}}' bindtap="onpay" data-id="1"><image src="../../images/lqhb.png"/>兑换券抵扣</view>
<!-- <view wx:if="{{ttype==0}}" class='{{zftype==1?"hover":""}}' bindtap="onpay" data-id="1"><image src="../../images/lqhb.png"/>兑换券抵扣</view> -->
<!-- <view wx:if="{{ttype==22}}" class='{{zftype==1?"hover":""}}' bindtap="onpay" data-id="1"><image src="../../images/jianjinpay.png"/>混合支付、先积分</view>
<view wx:if="{{ttype==1}}" class='{{zftype==5?"hover":""}}' bindtap="onpay" data-id="5"><image src="../../images/jianjinpay.png"/>流量积分</view>
<view wx:if="{{ttype==14}}" class='{{zftype==6?"hover":""}}' bindtap="onpay" data-id="6"><image src="../../images/jianjinpay.png"/>佣金抵扣</view> -->
</view>
</view>
<view class="pay_box" wx:if="{{zftype==1}}">
<!-- <view class="pay_box" wx:if="{{zftype==1}}">
<text class="pay_type" style="width:6em;">兑换券余额:</text>
<view class="dhj_box">
{{dhjye}}
</view>
</view>
</view> -->
<view class="bankcark_box" wx:if="{{zftype==4}}">
<view><picker class="picker_hx" name="picker_hx" value="{{bankindex}}" data-selecthx="{{banks[bankindex].key}}" range="{{banks}}" range-key="{{'key'}}" bindchange="BankChange"> <view class="picker">
<text wx:if='{{banks[bankindex]!=null}}'>{{banks[bankindex].key}}</text>

View File

@@ -1,4 +1,4 @@
var WxParse = null;
var WxParse = null;
//获取应用实例
var app = getApp()
var sopenFrame=null;

View File

@@ -49,7 +49,7 @@
<view class="scje">¥{{cell.scje}}</view>
</view>
<view class="jeto jeto0">
<view class="viphyj">兑换价:<text>{{cell.hyje}}</text></view>
<view class="viphyj">会员价:<text>{{cell.hyje}}</text></view>
</view>
</view>
</view>