This commit is contained in:
faiz 2024-05-17 18:35:31 +08:00
parent 6b402a0d47
commit a293629c81
13 changed files with 239 additions and 58 deletions

View File

@ -135,6 +135,12 @@ export function getSignList(data) {
export function setSignIntegral() {
return request.post('user/sign/create')
}
/**
* 开盲盒
*/
export function setBlind() {
return request.post('user/sign/open')
}
/**
* 签到列表(年月)

View File

@ -13,6 +13,12 @@
<view>
预售价
<text class="num">{{ attr.productSelect.price }}</text>
<view class="discount" v-if="attr.productSelect.coupon">
<view class="discount_main">
<view class="discount_left">可用抵扣</view>
<view class="discount_right">{{attr.productSelect.coupon}}</view>
</view>
</view>
<text v-if="presell_type === 2">定金¥<text class="num">{{ attr.productSelect.down_price }}</text></text>
</view>
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
@ -22,6 +28,12 @@
<view class="acea-row row-middle">
<view class="acea-row row-middle">
<text></text><text class="num">{{ attr.productSelect.price }}</text>
<view class="discount" v-if="attr.productSelect.coupon">
<view class="discount_main">
<view class="discount_left">可用抵扣</view>
<view class="discount_right">{{attr.productSelect.coupon}}</view>
</view>
</view>
<view v-if="attr.productSelect && attr.productSelect.svip_price" class="acea-row row-middle">
<text class='vip-money'>{{attr.productSelect.svip_price}}</text>
<view class="vipImg">
@ -151,6 +163,28 @@
</script>
<style scoped lang="scss">
.discount{
display: inline-block;
margin-left: 20rpx;
line-height: 48rpx;
min-height: 48rpx;
vertical-align: top;
border: 1px solid #F8D2CB;
padding-left: 20rpx;
border-radius: 10rpx;
&_main{
display: flex;
}
&_left{
padding-right: 10rpx;
border-right: 2px dotted #F6D3D7;
}
&_right{
padding: 0 10rpx;
background: #FDEFEE;
width: auto;
}
}
.product-window {
position: fixed;
bottom: 0;

View File

@ -21,6 +21,12 @@
-{{couponData.order_total_integral_price}}
</view>
</view>
<view v-if="couponData.order_total_amount_price>0" class="check-item">
<view>抵扣券抵扣</view>
<view class="radio">
-{{couponData.order_total_amount_price}}
</view>
</view>
<view v-if="couponData.total_platform_coupon_price>0" class="check-item">
<view>平台优惠金额</view>
<view class="radio">

View File

@ -13,6 +13,12 @@
<view>
预售价
<text class="num">{{ attr.productSelect.price }}</text>
<view class="discount" v-if="attr.productSelect.coupon">
<view class="discount_main">
<view class="discount_left">可用抵扣</view>
<view class="discount_right">{{attr.productSelect.coupon}}</view>
</view>
</view>
<text v-if="presell_type === 2">定金¥<text class="num">{{ attr.productSelect.down_price }}</text></text>
</view>
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
@ -28,6 +34,12 @@
</view>
<view v-else>
<text></text><text class="num">{{ attr.productSelect.price }}</text>
<view class="discount" v-if="attr.productSelect.coupon">
<view class="discount_main">
<view class="discount_left">可用抵扣</view>
<view class="discount_right">{{attr.productSelect.coupon}}</view>
</view>
</view>
</view>
<view v-if="svipPrice" class="acea-row row-middle">
<text class='vip-money'>{{attr.productSelect.svip_price}}</text>
@ -230,6 +242,28 @@
</script>
<style scoped lang="scss">
.discount{
display: inline-block;
margin-left: 20rpx;
line-height: 48rpx;
min-height: 48rpx;
vertical-align: top;
border: 1px solid #F8D2CB;
padding-left: 20rpx;
border-radius: 10rpx;
&_main{
display: flex;
}
&_left{
padding-right: 10rpx;
border-right: 2px dotted #F6D3D7;
}
&_right{
padding: 0 10rpx;
background: #FDEFEE;
width: auto;
}
}
.product-window {
position: fixed;
bottom: 0;

View File

@ -15,7 +15,6 @@
</view>
</view>
<view class="coupon_popups" v-if="popShow">
<view class="bg2"></view>
<view class="con" v-if="blind">
<view class="contents">
<image src="@/static/images/jf.png" style="width: 48px;height:48px;" mode=""></image>
@ -27,7 +26,7 @@
<view class='iconfont icon-guanbi3' @click="popShow = false"></view>
</view>
<view class="con" v-else>
<view class="content">
<view class="contents">
<image src="https://store.tropjoin.com/images/notBlind.png" style="width: 80px;height: 80px;" mode=""></image>
<view class="text-black">很遗憾,差一点就中奖了</view>
<view class="text-red">期待您下次再来</view>
@ -42,7 +41,7 @@
<script>
import {getWhellNumber,getWhellConfig,getWhellAction,getWhellList,setSignIntegral} from '@/api/user.js';
import {getWhellNumber,getWhellConfig,getWhellAction,getWhellList,setSignIntegral,setBlind} from '@/api/user.js';
import blindBox from '@/components/blindBox/blindBox.vue';
export default {
components: {
@ -73,17 +72,18 @@
this.close();
},
async openBox(){
await setSignIntegral().then(res=>{
await setBlind().then(res=>{
this.drawInfo.text = res.data.integral;
this.drawInfo.wheel=res.data.wheel;
this.gifShow=true;
this.blind=!!res.data.integral;
setTimeout(()=>{
this.gifShow=false;
this.popShow=true;
},1500)
}).catch(err=>{
this.close();
return this.$util.Tips({title:err})
// this.close();
// return this.$util.Tips({title:err})
});
},

View File

@ -28,8 +28,8 @@ let cookieName = "VCONSOLE",
query = parseQuery(),
urlSpread = query["spread"],
vconsole = query[cookieName.toLowerCase()],
md5 = "b14d1e9baeced9bb7525ab19ee35f2d2", // MD5 加密开启vconsole模式
md5Un = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
md5 = "4F02CE914A28098A5CDEA243CE51C333", // MD5 加密开启vconsole模式
md5Un = "AEC89F78998B46D17748574D027729B2"; //UN_CREMB MD5 加密关闭vconsole模式
if (urlSpread !== undefined) {
var spread = Cache.get(SPREAD);

View File

@ -26,6 +26,12 @@
<!--有氛围图-->
<view v-if="storeInfo.atmosphere_pic" :style="{ backgroundImage: `url(${storeInfo.atmosphere_pic})` }" class='nav acea-row row-between-wrapper'>
<view class='money skeleton-rect'><text class='num'>{{storeInfo.price}}</text>
<view class="discount" v-if="skuCoupon">
<view class="discount_main">
<view class="discount_left">可用抵扣</view>
<view class="discount_right">{{skuCoupon}}</view>
</view>
</view>
<text v-if="!svipData" class='y-money'>{{storeInfo.ot_price}}</text>
<view class="atmosphere" v-if="svipData && svipData.show_svip_price && svipData.show_svip" style="display: inline-block;">
<text class="vip-money">{{storeInfo.svip_price}}</text>
@ -54,6 +60,12 @@
<view class='money p-color skeleton-rect' style="min-width: 70rpx;">
<text class='num'>{{storeInfo.price}}</text>
<view class="discount" v-if="skuCoupon">
<view class="discount_main">
<view class="discount_left">可用抵扣</view>
<view class="discount_right">{{skuCoupon}}</view>
</view>
</view>
<view v-if="svipData && svipData.show_svip_price && svipData.show_svip" style="display: inline-block;">
<text class="vip-money">{{storeInfo.svip_price}}</text>
<image class="vip-image" :src="`${domain}/static/images/svip.png`"></image>
@ -95,7 +107,7 @@
<view class="skeleton-rect">库存:{{storeInfo.stock ? storeInfo.stock : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view>
<view class="skeleton-rect">销量:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view>
</view>
<navigator v-if="storeInfo.top_pid" hover-class='none' :url="`/pages/activity/rank/index?cate_id=${storeInfo.top_pid}`" class='label'>
<!-- <navigator v-if="storeInfo.top_pid" hover-class='none' :url="`/pages/activity/rank/index?cate_id=${storeInfo.top_pid}`" class='label'>
<view class="rank_list acea-row row-between-wrapper">
<view class="acea-row row-between-wrapper">
<text class="rank_title"></text>
@ -103,14 +115,14 @@
</view>
<text class="iconfont icon-xiala1"></text>
</view>
</navigator>
<view class='coupon acea-row row-between-wrapper skeleton-rect' @click='couponTap' style="margin-top: 20rpx;" v-if="coupon.list.length > 0">
</navigator> -->
<!-- <view class='coupon acea-row row-between-wrapper skeleton-rect' @click='couponTap' style="margin-top: 20rpx;" v-if="coupon.list.length > 0">
<view class='hide line1 acea-row'>
优惠券
<view class='activity' v-for="(item,index) in coupon.list" :key="index">{{item.use_min_price}}{{item.coupon_price}}</view>
</view>
<view class='iconfont icon-jiantou'></view>
</view>
</view> -->
</view>
<view class='attribute acea-row row-between-wrapper skeleton-rect' @click="selecAttr">
<view class="acea-row row-between-wrapper">{{attrTxt}}
@ -495,6 +507,7 @@
'coupon': false,
list: [],
},
skuCoupon:'',
attrTxt: '选择', //
attrValue: '', //
animated: false, //
@ -1187,6 +1200,8 @@
}
//sort();:--
let productSelect = this.productValue[value.join(",")];
// console.log(productSelect);
this.skuCoupon = productSelect.coupon
if (productSelect && productAttr.length) {
this.$set(
this.attr.productSelect,
@ -1198,6 +1213,7 @@
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "coupon", productSelect.coupon);
this.$set(this, "uniqueValue", productSelect.unique);
this.$set(this, "attrValue", value.join(","));
this.$set(this, "attrTxt", "选择");
@ -1243,6 +1259,7 @@
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "coupon", productSelect.coupon);
this.$set(this, "uniqueValue", productSelect.unique);
this.$set(this, "attrValue", value.join(","));
this.$set(this, "attrTxt", "选择");
@ -1414,6 +1431,20 @@
};
postCartAdd(q)
.then(function(res) {
if('no_real' == res.data.status){
return uni.showModal({
title: res.message,
content: res.msg,
confirmText: '实名认证绑定',
success(res) {
if (res.confirm) {
uni.navigateTo({
url:`/pages/users/real_name_authentication/index?type=edit`
})
}
}
});
}
that.isOpen = that.attr.cartAttr = false;
let cartId = res.data.cart_id
let arr = (Cache.get(CART_ID)&&JSON.parse(Cache.get(CART_ID))) || []
@ -1755,6 +1786,28 @@
.ml8{
top:2rpx
}
.discount{
display: inline-block;
margin-left: 20rpx;
line-height: 60rpx;
min-height: 60rpx;
vertical-align: top;
border: 1px solid #F8D2CB;
padding-left: 20rpx;
border-radius: 10rpx;
&_main{
display: flex;
}
&_left{
padding-right: 10rpx;
border-right: 2px dotted #F6D3D7;
}
&_right{
padding: 0 10rpx;
background: #FDEFEE;
width: auto;
}
}
.activity_pin {
width: auto;
height: 44rpx;

View File

@ -25,7 +25,7 @@
<view class="name">{{item.mer_name}}</view>
<text class="iconfont icon-xiangyou"></text>
</navigator>
<view class="coupon-btn" v-if="item.hasCoupon>0" @click="giveCoupon(item)">优惠券</view>
<!-- <view class="coupon-btn" v-if="item.hasCoupon>0" @click="giveCoupon(item)">优惠券</view> -->
</view>
<navigator v-for="goods in item.list" :key="goods.cart_id" :url='"/pages/goods_details/index?id="+goods.product.product_id'
hover-class='none' class='picTxt acea-row'>
@ -52,6 +52,12 @@
<image :src="`${domain}/static/images/svip.png`"></image>
</view>
</view>
<view class="discount" v-if="goods.productAttr.coupon">
<view class="discount_main">
<view class="discount_left">可用抵扣</view>
<view class="discount_right">{{goods.productAttr.coupon}}</view>
</view>
</view>
</view>
<view class='carnum acea-row row-center-wrapper'>
<view class="reduce" :class="goods.numSub || (goods.product.once_max_count>0 && goods.product.once_min_count>0 && goods.cart_num <= goods.product.once_min_count) ? 'on' : ''" @click.stop='subCart(goods)'>-</view>
@ -601,6 +607,7 @@
getCartList: function(isChange) {
let that = this;
getCartList().then(res => {
console.log(res);
if(checkCart()){
that.selectedArr = (Cache.get(CART_ID)&&JSON.parse(Cache.get(CART_ID))) || []
}else{
@ -836,6 +843,30 @@
</script>
<style scoped lang="scss">
.discount{
color: var(--view-priceColor);
font-weight: 700;
display: inline-block;
margin-top: 10rpx;
line-height: 48rpx;
min-height: 48rpx;
border: 1px solid #F8D2CB;
padding-left: 8rpx;
font-size: 24rpx;
border-radius: 10rpx;
&_main{
display: flex;
}
&_left{
padding-right: 10rpx;
border-right: 2px dotted #F6D3D7;
}
&_right{
padding: 0 10rpx;
background: #FDEFEE;
width: auto;
}
}
.shoppingCart .labelNav {
height: 76rpx;
padding: 0 30rpx;

View File

@ -282,7 +282,7 @@
</view>
</view> -->
<view class="item">
<!-- <view class="item">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
@ -318,7 +318,7 @@
</view>
</view>
</view>
</view>
</view> -->
<button class='submitBtn' :disabled="!validate" :class="validate === true ? 'on':''"
@click="nextStep">下一步</button>
</view>
@ -494,9 +494,9 @@
// if(isVeteran&&isVeteranPhoto.length==0){
// this.validate=false;
// }else
if (isFlagshipStore&&isFlagshipStorePhoto.length==0){
this.validate=false;
}else{
// if (isFlagshipStore&&isFlagshipStorePhoto.length==0){
// this.validate=false;
// }else{
let date2 = {
phone: EnterprisePhone,
mer_name:shopName,
@ -527,7 +527,7 @@
this.validate = true;
}
// }
}else{
this.validate=false;

View File

@ -141,7 +141,7 @@
</view>
<view class='discount' v-else>免运费</view>
</view>
<view class='item acea-row row-between-wrapper'
<!-- <view class='item acea-row row-between-wrapper'
v-if="order_type != 3 && order_type != 4 && item.order.enabledCoupon">
<view>店铺优惠券</view>
<block v-if="item.coupon.length>0">
@ -154,7 +154,7 @@
<block v-else>
<view class='discount'>暂无优惠券</view>
</block>
</view>
</view> -->
<view v-if="item.openReceipt == 1" class='item acea-row row-between-wrapper'>
<view>开具发票 <text @tap="showInvoice" class="iconfont icon-wenhao1"></text></view>
<view class='discount discount_voice' @tap="goInvoice(item.mer_id)">
@ -414,10 +414,10 @@
</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="userInfo.now_money>0">
<view>抵扣抵扣</view>
<view>抵扣抵扣</view>
<view class='money'>
<text v-if="!now_integral">当前抵扣<text class="pColor">{{userInfo.now_money}}</text></text>
<text v-else>使用了{{use_count}}个抵扣抵扣<text
<text v-if="!now_integral">当前抵扣<text class="pColor">{{userInfo.now_money}}</text></text>
<text v-else>使用了{{use_count}}个抵扣抵扣<text
class="pColor">{{use_amount}}</text></text>
<view class="checkbox integral_checked" @click="changeIntegral('now')">
<view class="iconfont icon-weixuanzhong" v-if="!now_integral"></view>
@ -425,7 +425,7 @@
</view>
</view>
</view>
<view class='item acea-row row-between-wrapper'
<!-- <view class='item acea-row row-between-wrapper'
v-if="order_type != 3 && order_type != 4 && enabledPlatformCoupon">
<view>平台优惠券<text @tap="showCoupon" class="iconfont icon-wenhao1"></text></view>
<block v-if="platformCoupon.length > 0">
@ -438,7 +438,7 @@
<block v-else>
<view class='discount'>暂无优惠券</view>
</block>
</view>
</view> -->
<view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
<view>运费</view>
<view class='money'>+{{priceGroup.storePostage}}</view>
@ -811,8 +811,10 @@
console.log(e);
if(e=='use'){
this.use_integral = !this.use_integral;
this.now_integral = false
}else{
this.now_integral = !this.now_integral;
this.use_integral = false
}
this.getConfirm(this.addressId);
},

View File

@ -75,8 +75,12 @@
number:'',
image1:[],
image2:[],
type:''
}
},
onLoad(e) {
this.type = e.type
},
methods:{
async submitReal(){
let data1={
@ -87,17 +91,26 @@
}
await userReal(data1).then((res)=>{
uni.showToast({
icon:'success',
title: res
icon:'none',
title: res.message
});
uni.redirectTo({
url: '/pages/user/index',
success: res => {},
fail: () => {},
complete: () => {}
});
console.log(this.type);
if(this.type == 'edit'){
setTimeout(()=>{
uni.navigateBack({
delta: 1
});
},1000)
}else{
setTimeout(()=>{
uni.switchTab({
url: '/pages/user/index'
});
},1000)
}
}).catch((err)=>{
console.log(this.type);
uni.showToast({
icon:'none',
title: err
@ -275,7 +288,7 @@
border-radius: 60rpx;
// background-color: red;
color: white;
font-size: 48rpx;
font-size: 32rpx;
text-align: center;
line-height: 100rpx;
display: flex;

View File

@ -20,7 +20,7 @@
<view class='list acea-row row-between-wrapper'>
<view class='item' v-for="(item,index) in signConfig" :key="index">
<view :class='(index+1) == signConfig.length ? "rewardTxt" : ""'>{{item.value.sign_day}}</view>
<view class='venus' :class="(index + 1 === signConfig.length ? 'reward' : '') + '' +(sign_index >= index + 1 ? 'venusSelect' : '')"></view>
<view class='venus' :class="(index + 1 === signConfig.length ? 'reward' : '') + '' +(sign_index >= index + 1 ? ' venusSelect' : '')"></view>
<!-- <view class='num' :class='item.is_sgin ? "on" : ""'>+{{item.value.sign_integral}}</view> -->
</view>
</view>
@ -53,7 +53,7 @@
</view>
<treasureBox v-if="treasureShow" @closeTreasureBox="closeBox"></treasureBox>
<view class='signTip acea-row row-center-wrapper' :class='active==true?"on":""'>
<view class='signTip acea-row row-center-wrapper' v-if="active" :class='active==true?"on":""'>
<view class='signTipLight loadingpic'></view>
<view class='signTipCon' :style="'background-image: url('+domain+'/static/diy/signSuccess'+keyColor+'.png)'">
<view class='state'>签到成功</view>
@ -91,7 +91,7 @@
is_sign: false, //
disabled: false,
treasureShow:false,
blindShow:false
};
},
computed: mapGetters(['isLogin','viewColor','keyColor']),
@ -181,31 +181,33 @@
let that = this, sum_sgin_day = that.signConfig.sign_num;
if (that.userInfo.is_day_sgin) return this.$util.Tips({title:'您今日已签到!'});
that.disabled = true;
if(!that.userInfo.is_day_sgin&&that.sign_index==6){
that.blindShow=true;
}else{
that.treasureShow=true;
}
// setSignIntegral().then(res=>{
// // that.active = true;
// that.integral = res.data.integral;
// that.sign_index = (that.sign_index + 1) > that.signConfig.title.length ? 1 : that.sign_index + 1;
// that.signCount = that.PrefixInteger(sum_sgin_day + 1, 4);
// that.$set(that.userInfo,'is_sgin',true);
// that.$set(that.userInfo,'integral',that.$util.$h.Add(that.userInfo.integral, res.data.integral));
// }).catch(err=>{
// that.disabled = false;
// return this.$util.Tips({title:err})
// });
// if(!that.userInfo.is_day_sgin&&that.sign_index==6){
// that.treasureShow=true;
// }else{
setSignIntegral().then(res=>{
that.active = true;
that.integral = res.data.integral;
that.sign_index = (that.sign_index + 1) > that.signConfig.title.length ? 1 : that.sign_index + 1;
that.signCount = that.PrefixInteger(sum_sgin_day + 1, 4);
that.$set(that.userInfo,'is_sgin',true);
that.$set(that.userInfo,'integral',that.$util.$h.Add(that.userInfo.integral, res.data.integral));
}).catch(err=>{
that.disabled = false;
return this.$util.Tips({title:err})
});
// }
},
/**
* 关闭签到提示
*/
close:function(){
this.active = false;
this.getSignList();
this.getUserInfo();
let that = this
if(!that.userInfo.is_day_sgin&&that.sign_index==6){
that.treasureShow=true;
}
// this.getSignList();
// this.getUserInfo();
}
}
}

Binary file not shown.