更新Note

1. 修复购物车,订单和退单后后置任务正确执行
	2. 修复佣金记录金额和详情
	3. 修复管理端 移动应用界面下订单管理数据统计不准确的问题
	4. 修复短信API升级-后台使用一号通
	5. 修复用户管理相关问题
	6. 修复核销点核销后核销地址不准确
	7. 修复资源同步云服务的问题
新增功能
	1. 秒杀
		a. 秒杀时段配置
		b. 秒杀商品维护
	2. 财务管理
		a. 申请提现
		b. 财务记录
			i. 充值记录
			ii. 资金监控
		c. 佣金记录
	3. 普通商品显示该商品正在参加的活动信息[秒杀]
This commit is contained in:
stivepeim
2020-11-05 16:21:06 +08:00
parent 912cf6403e
commit 6827148d7a
574 changed files with 45105 additions and 4899 deletions

View File

@@ -110,7 +110,7 @@
that.loadingList = false;
})
.catch(res => {
that.$dialog.error(res.msg);
that.$dialog.error(res);
});
},
getBargainUserCancel: function(bargainId) {
@@ -125,7 +125,7 @@
that.bargain = [];
that.getBargainUserList();
that.$util.Tips({
title: res.msg
title: res
})
})
.catch(res => {

View File

@@ -593,7 +593,7 @@
})
.then(res => {
that.$util.Tips({
title:res.msg
title:res
},{
tab: 3,
})

View File

@@ -2,9 +2,23 @@
<div>
<view class='flash-sale'>
<view class="saleBox"></view>
<view class='header' v-if="timeList.length>0">
<image :src='timeList[active].slide'></image>
<!-- banner -->
<view class="header" v-if="timeList.length">
<swiper indicator-dots="true" autoplay="true" :circular="circular" interval="3000" duration="1500"
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
<block v-for="(item,index) in JSON.parse(timeList[active].slide)" :key="index">
<swiper-item>
<image :src="item.sattDir" class="slide-image" lazy-load></image>
<!-- <navigator :url='item.url' class='slide-navigator acea-row row-between-wrapper' hover-class='none'>
<image :src="item.pic" class="slide-image" lazy-load></image>
</navigator> -->
</swiper-item>
</block>
</swiper>
</view>
<!-- <view class='header' v-if="timeList.length>0">
<image :src='timeList[active].slide'></image>
</view> -->
<view class="seckillList acea-row row-between-wrapper">
<view class="priceTag">
<image src="/static/images/priceTag.png"></image>
@@ -13,14 +27,14 @@
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;height:106rpx;">
<block v-for="(item,index) in timeList" :key='index'>
<view @tap='settimeList(item,index)' class='item' :class="active == index?'on':''">
<view class='time'>{{item.time}}</view>
<view class="state">{{item.state}}</view>
<view class='time'>{{item.time.split(',')[0]}}</view>
<view class="state">{{item.statusName}}</view>
</view>
</block>
</scroll-view>
</view>
</view>
<view class='list'>
<view class='list' v-if='seckillList.length>0'>
<block v-for="(item,index) in seckillList" :key='index'>
<view class='item acea-row row-between-wrapper' @tap='goDetails(item)'>
<view class='pictrue'>
@@ -30,16 +44,16 @@
<view class='name line1'>{{item.title}}</view>
<view class='money'>¥
<text class='num font-color'>{{item.price}}</text>
<text class="y_money">{{item.ot_price}}</text>
<text class="y_money">¥{{item.otPrice}}</text>
</view>
<view class="limit">限量 <text class="limitPrice">{{item.quota}}</text></view>
<view class="limit">限量 <text class="limitPrice">{{item.quotaShow}} {{item.unitName}}</text></view>
<view class="progress">
<view class='bg-reds' :style="'width:'+item.percent+'%;'"></view>
<view class='piece'>已抢{{item.percent}}%</view>
</view>
</view>
<view class='grab bg-color' v-if="status == 1">马上抢</view>
<view class='grab bg-color' v-else-if="status == 2">未开始</view>
<view class='grab bg-color' v-if="status == 2">马上抢</view>
<view class='grab bg-color' v-else-if="status == 1">未开始</view>
<view class='grab bg-color-hui' v-else>已结束</view>
</view>
</block>
@@ -56,7 +70,7 @@
<script>
import {
getSeckillIndexTime,
getSeckillHeaderApi,
getSeckillList
} from '../../../api/activity.js';
import home from '@/components/home/index.vue'
@@ -66,6 +80,10 @@
},
data() {
return {
circular: true,
autoplay: true,
interval: 500,
// duration: 500,
topImage: '',
seckillList: [],
timeList: [],
@@ -81,6 +99,7 @@
loading: false,
loadend: false,
pageloading: false,
seckillHeader: [],
}
},
onLoad() {
@@ -89,8 +108,7 @@
methods: {
getSeckillConfig: function() {
let that = this;
getSeckillIndexTime().then(res => {
that.topImage = res.data.lovely;
getSeckillHeaderApi().then(res => {
that.timeList = res.data.seckillTime;
that.active = res.data.seckillTimeIndex;
if (that.timeList.length) {
@@ -116,7 +134,7 @@
if (that.pageloading) return;
this.pageloading = true
getSeckillList(that.timeList[that.active].id, data).then(res => {
var seckillList = res.data;
var seckillList = res.data.list;
var loadend = seckillList.length < that.limit;
that.page++;
that.seckillList = that.seckillList.concat(seckillList),
@@ -147,7 +165,7 @@
},
goDetails(item){
uni.navigateTo({
url: '/pages/activity/goods_seckill_details/index?id=' + item.id + '&time=' + this.timeList[this.active].stop + '&status=' + this.status
url: '/pages/activity/goods_seckill_details/index?id=' + item.id + '&time=' + this.timeList[this.active].timeSwap + '&status=' + this.status + '&productId=' + item.productId
})
}
},
@@ -263,6 +281,7 @@
width: 180rpx;
height: 180rpx;
border-radius: 10rpx;
background-color: #F5F5F5;
}
.flash-sale .list .item .pictrue image {

View File

@@ -19,15 +19,10 @@
<view id="past0">
<productConSwiper :imgUrls='imgUrls'></productConSwiper>
<view class='nav acea-row row-between-wrapper'>
<view class='money'><text class='num'>{{storeInfo.price}}</text><text class='y-money'>{{storeInfo.ot_price}}</text></view>
<view class='money'><text class='num'>{{storeInfo.price}}</text><text class='y-money'>{{storeInfo.otPrice}}</text></view>
<view class='acea-row row-middle'>
<view class='time' v-if="status == 1">
<view class='time' v-if="status == 2">
<view>距秒杀结束仅剩</view>
<!-- <view class='timeCon'>
<text class='num'>{{countDownHour}}</text>
<text class='num'>{{countDownMinute}}</text>
<text class='num'>{{countDownSecond}}</text>
</view> -->
<countDown :is-day="false" :tip-text="' '" :day-text="' '" :hour-text="' : '" :minute-text="' : '" :second-text="' '"
:datatime="datatime"></countDown>
</view>
@@ -43,9 +38,8 @@
<view class='iconfont icon-fenxiang' @click="listenerActionSheet"></view>
</view>
<view class='label acea-row row-middle'>
<!-- <view class='stock'>库存{{storeInfo.stock}}{{storeInfo.unit_name}}</view> -->
<view class='stock'>累计销售{{storeInfo.total?storeInfo.total:0}}</view>
<view>限量: {{ storeInfo.quota ? storeInfo.quota : 0 }} </view>
<view class='stock'>累计销售{{Number(storeInfo.sales) + Number(storeInfo.ficti) || 0}}{{storeInfo.unitName}}</view>
<view>限量: {{ storeInfo.quotaShow ? storeInfo.quotaShow : 0 }} {{storeInfo.unitName}}</view>
</view>
</view>
<view class='attribute acea-row row-between-wrapper' @tap='selecAttr' v-if='attribute.productAttr.length'>
@@ -56,7 +50,7 @@
<view class='userEvaluation' id="past1">
<view class='title acea-row row-between-wrapper'>
<view>用户评价({{replyCount}})</view>
<navigator class='praise' hover-class='none' :url="'/pages/users/goods_comment_list/index?product_id='+storeInfo.product_id">
<navigator class='praise' hover-class='none' :url="'/pages/users/goods_comment_list/index?productId='+ storeInfo.productId">
<text class='font-color'>{{replyChance}}%</text>好评率
<text class='iconfont icon-jiantou'></text>
</navigator>
@@ -67,7 +61,7 @@
<view class='title'>产品介绍</view>
<view class='conter'>
<!-- <template is="wxParse" data="{{wxParseData:description.nodes}}" /> -->
<jyf-parser :html="storeInfo.description" ref="article" :tag-style="tagStyle"></jyf-parser>
<jyf-parser :html="storeInfo.content" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
</view>
<view style='height:120rpx;'></view>
@@ -90,19 +84,23 @@
<view class='iconfont icon-shoucang' v-else></view>
<view>收藏</view>
</view>
<view class="bnt acea-row" v-if="status == 1 && attribute.productSelect.quota > 0 && attribute.productSelect.product_stock>0">
<view class="bnt acea-row" v-if="status == 2 && attribute.productSelect.quota > 0 && attribute.productSelect.stock>0">
<view class="joinCart bnts" @tap="openAlone">单独购买</view>
<view class="buy bnts" @tap="goCat">立即购买</view>
</view>
<view class="bnt acea-row" v-if="(status == 1 && attribute.productSelect.quota <= 0) || (status == 3 && attribute.productSelect.quota <= 0) || (status == 1 && attribute.productSelect.product_stock <= 0) || (status == 3 && attribute.productSelect.product_stock <= 0)">
<view class="bnt acea-row" v-if="status == 2 && (attribute.productSelect.quota <= 0 || attribute.productSelect.stock<= 0)">
<view class="joinCart bnts" @tap="openAlone">单独购买</view>
<view class="buy bnts bg-color-hui">已售罄</view>
</view>
<view class="bnt acea-row" v-if="status == 2">
<view class="bnt acea-row" v-if="status == 0">
<view class="joinCart bnts" @tap="openAlone">单独购买</view>
<view class="buy bnts bg-color-hui">已关闭</view>
</view>
<view class="bnt acea-row" v-if="status == 1">
<view class="joinCart bnts" @tap="openAlone">单独购买</view>
<view class="buy bnts bg-color-hui">未开始</view>
</view>
<view class="bnt acea-row" v-if="status == 0">
<view class="bnt acea-row" v-if="status == -1">
<view class="joinCart bnts" @tap="openAlone">单独购买</view>
<view class="buy bnts bg-color-hui">已结束</view>
</view>
@@ -133,10 +131,11 @@
<view class="">生成海报</view>
</button>
</view>
<view class="mask" v-if="posters" @click="listenerActionClose"></view>
<view class="mask" v-if="posters" @click="closePosters"></view>
<view class="mask" v-if="canvasStatus" @click="listenerActionClose"></view>
<!-- 海报展示 -->
<view class='poster-pop' v-if="posterImageStatus">
<view class='poster-pop' v-if="canvasStatus">
<image src='/static/images/poster-close.png' class='close' @click="posterImageClose"></image>
<image :src='posterImage'></image>
<!-- #ifndef H5 -->
@@ -146,13 +145,19 @@
<view class="keep">长按图片可以保存到手机</view>
<!-- #endif -->
</view>
<view class='mask' v-if="posterImageStatus"></view>
<canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas>
<view class="canvas" v-else>
<canvas style="width:750px;height:1190px;" canvas-id="firstCanvas"></canvas>
<canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}"/>
</view>
<!-- <view class='mask' v-if="canvasStatus"></view> -->
<!--
<canvas class="canvas" canvas-id='qrcode' v-if="canvasStatus"></canvas> -->
</view>
</template>
<script>
const app = getApp();
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
import {
mapGetters
} from "vuex";
@@ -163,13 +168,18 @@
import {
postCartAdd,
collectAdd,
collectDel
collectDel,
getReplyList,
getReplyConfig
} from '@/api/store.js';
import productConSwiper from '@/components/productConSwiper/index.vue'
import productWindow from '@/components/productWindow/index.vue'
import userEvaluation from '@/components/userEvaluation/index.vue'
// #ifdef MP
import authorize from '@/components/Authorize';
import {
getQrcode
} from '@/api/api.js';
// #endif
import parser from "@/components/jyf-parser/jyf-parser";
import home from '@/components/home/index.vue'
@@ -243,7 +253,14 @@
posterImage: '', //海报路径
posterbackgd: '/static/images/posterbackgd.png',
actionSheetHidden: false,
cart_num:''
cart_num:'',
attrTxt: '',
qrcodeSize: 600,
productId: 0, //商品id
aloneAttrValueId: 0 ,//单规格规格id
imagePath:'',//海报路径
imgTop:'',
buyNum: 1
}
},
components: {
@@ -257,7 +274,7 @@
authorize
// #endif
},
computed: mapGetters(['isLogin']),
computed: mapGetters(['isLogin','uid']),
onLoad(options) {
let that = this
@@ -280,7 +297,6 @@
//扫码携带参数处理
if (options.scene) {
let value = this.$util.getUrlParams(decodeURIComponent(options.scene));
console.log(value,'options')
if (value.id){
this.id = value.id;
}else{
@@ -302,8 +318,11 @@
this.datatime = Number(options.time)
this.status = options.status
}
if(options.productId) this.productId = Number(options.productId)
if (this.isLogin) {
this.getSeckillDetail();
this.getProductReplyList();
this.getProductReplyCount();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
@@ -315,13 +334,34 @@
}
},
methods: {
getProductReplyList: function() {
getReplyList(this.productId, {
page: 1,
limit: 3,
type: 0,
}).then(res => {
this.reply = res.data.list;
})
},
getProductReplyCount: function() {
let that = this;
getReplyConfig(that.productId).then(res => {
that.$set(that, 'replyChance', res.data.replyChance * 100);
that.$set(that, 'replyCount', res.data.sumCount);
});
},
/**
* 购物车手动填写
*
*/
iptCartNum: function (e) {
this.$set(this.attribute.productSelect,'cart_num',e);
this.$set(this.attribute.productSelect, 'cart_num', e?e:1);
this.$set(this, "cart_num", e);
if (e > 1) {
return this.$util.Tips({
title: `该商品每次限购1${this.storeInfo.unitName}`
});
}
},
// 后退
returns: function() {
@@ -337,33 +377,34 @@
getSeckillDetail: function() {
let that = this;
getSeckillDetail(that.id).then(res => {
let title = res.data.storeInfo.title;
//let title = res.data.title;
this.aloneAttrValueId = res.data.aloneAttrValueId;
this.storeInfo = res.data.storeInfo;
this.imgUrls = res.data.storeInfo.images;
this.imgUrls = JSON.parse(res.data.storeInfo.images) || [];
this.attribute.productAttr = res.data.productAttr;
this.productValue = res.data.productValue;
this.personNum = res.data.storeInfo.num;
this.replyCount = res.data.replyCount;
this.reply = res.data.reply ? [res.data.reply] : [];
this.replyChance = res.data.replyChance
this.personNum = res.data.storeInfo.quota;
this.attribute.productSelect.num = res.data.storeInfo.num;
// #ifdef H5
this.PromotionCode = res.data.storeInfo.code_base
that.storeImage = that.storeInfo.image
that.getImageBase64();
that.storeImage = that.storeInfo.image;
that.make();
that.getImageBase64(that.storeImage);
that.setShare();
// #endif
// #ifdef MP
that.getQrcode();
// #endif
// #ifndef H5
that.downloadFilestoreImage();
that.downloadFilePromotionCode();
//that.downloadFilePromotionCode();
// #endif
that.DefaultSelect();
setTimeout(function() {
that.infoScroll();
}, 500);
app.globalData.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id + '&time=' + that.time +
'&status=' + that.status + '&scene=' + that.storeInfo.uid;
// wxParse.wxParse('description', 'html', that.data.storeInfo.description || '', that, 0);
// wxh.time(that.data.time, that);
'&status=' + that.status + '&scene=' + that.storeInfo.uid;
}).catch(err => {
that.$util.Tips({
title:err
@@ -385,7 +426,6 @@
link: location.href,
imgUrl: this.storeInfo.image
}).then(res => {
console.log(res);
}).catch(err => {
console.log(err);
});
@@ -398,9 +438,9 @@
let self = this
let productAttr = self.attribute.productAttr;
let value = [];
for (var key in this.productValue) {
if (this.productValue[key].quota > 0) {
value = this.attribute.productAttr.length ? key.split(",") : [];
for (var key in self.productValue) {
if (self.productValue[key].stock > 0) {
value = self.attribute.productAttr.length ? key.split(",") : [];
break;
}
}
@@ -408,34 +448,35 @@
this.$set(productAttr[i], "index", value[i]);
}
//sort();排序函数:数字-英文-汉字;
let productSelect = this.productValue[value.sort().join(",")];
let productSelect = this.productValue[value.join(",")];
if (productSelect && productAttr.length) {
self.$set(
self.attribute.productSelect,
"store_name",
self.storeInfo.title
"storeName",
self.storeInfo.storeName
);
self.$set(self.attribute.productSelect, "image", productSelect.image);
self.$set(self.attribute.productSelect, "price", productSelect.price);
self.$set(self.attribute.productSelect, "stock", productSelect.stock);
self.$set(self.attribute.productSelect, "unique", productSelect.unique);
self.$set(self.attribute.productSelect, "unique", productSelect.id);
self.$set(self.attribute.productSelect, "quota", productSelect.quota);
self.$set(self.attribute.productSelect, "quota_show", productSelect.quota_show);
self.$set(self.attribute.productSelect, "product_stock", productSelect.product_stock);
self.$set(self.attribute.productSelect, "quotaShow", productSelect.quotaShow);
self.$set(self.attribute.productSelect, "cart_num", 1);
self.$set(self, "attrValue", value.sort().join(","));
self.attrValue = value.sort().join(",")
self.$set(self, "attrValue", value.join(","));
// self.$set(self, "attrValue", value.sort().join(","));
this.$set(self, "attrTxt", "已选择")
self.attrValue = value.join(",")
// self.attrValue = value.sort().join(",")
} else if (!productSelect && productAttr.length) {
self.$set(
self.attribute.productSelect,
"store_name",
self.storeInfo.title
"storeName",
self.storeInfo.storeName
);
self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
self.$set(self.attribute.productSelect, "quota", 0);
self.$set(self.attribute.productSelect, "quota_show", 0);
self.$set(self.attribute.productSelect, "product_stock", 0);
self.$set(self.attribute.productSelect, "quota", 0);
self.$set(self.attribute.productSelect, "stock", 0);
self.$set(self.attribute.productSelect, "unique", "");
self.$set(self.attribute.productSelect, "cart_num", 0);
@@ -444,22 +485,20 @@
} else if (!productSelect && !productAttr.length) {
self.$set(
self.attribute.productSelect,
"store_name",
self.storeInfo.title
"storeName",
self.storeInfo.storeName
);
self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
self.$set(self.attribute.productSelect, "stock", self.storeInfo.stock);
self.$set(self.attribute.productSelect, "quota", self.storeInfo.quota);
self.$set(self.attribute.productSelect, "product_stock", self.storeInfo.product_stock);
self.$set(self.attribute.productSelect, "quotaShow", self.storeInfo.quotaShow);
self.$set(self.attribute.productSelect, "stock", self.storeInfo.stock);
self.$set(
self.attribute.productSelect,
"unique",
self.storeInfo.unique || ""
self.aloneAttrValueId || ""
);
self.$set(self.attribute.productSelect, "cart_num", 1);
self.$set(self.attribute.productSelect, "quota", productSelect.quota);
self.$set(self.attribute.productSelect, "product_stock", productSelect.product_stock);
self.$set(self, "attrValue", "");
self.$set(self, "attrTxt", "请选择");
}
@@ -480,36 +519,40 @@
//获取当前变动属性
let productSelect = this.productValue[this.attrValue];
if (this.cart_num) {
productSelect.cart_num = this.cart_num;
this.attribute.productSelect.cart_num = this.cart_num;
}
productSelect.cart_num = this.cart_num;
this.attribute.productSelect.cart_num = this.cart_num;
}
//如果没有属性,赋值给商品默认库存
if (productSelect === undefined && !this.attribute.productAttr.length)
productSelect = this.attribute.productSelect;
//无属性值即库存为0不存在加减
if (productSelect === undefined) return;
let stock = productSelect.stock || 0;
let quotaShow = productSelect.quota_show || 0;
let productStock = productSelect.product_stock || 0;
let quota = productSelect.quota || 0;
let num = this.attribute.productSelect;
let nums = this.storeInfo.num || 0;
//设置默认数据
if (productSelect.cart_num == undefined) productSelect.cart_num = 1;
if (productSelect.cart_num == undefined) productSelect.cart_num = 1;
if (changeValue) {
num.cart_num ++;
if(quotaShow >= productStock){
if (num.cart_num > productStock) {
this.$set(this.attribute.productSelect, "cart_num", productStock);
this.$set(this, "cart_num", productStock);
}
}else{
if (num.cart_num > quotaShow) {
this.$set(this.attribute.productSelect, "cart_num", quotaShow);
this.$set(this, "cart_num", quotaShow);
}
console.log(this.buyNum);
if (num.cart_num === 1) {
return this.$util.Tips({
title: `该商品每次限购1${this.storeInfo.unitName}`
});
}
num.cart_num++;
let arrMin = [];
arrMin.push(nums);
arrMin.push(quota);
arrMin.push(stock);
let minN = Math.min.apply(null, arrMin);
if (num.cart_num >= minN) {
this.$set(this.attribute.productSelect, "cart_num", minN ? minN : 1);
this.$set(this, "cart_num", minN ? minN : 1);
}
this.$set(this, "cart_num", num.cart_num);
this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
} else {
num.cart_num--;
if (num.cart_num < 1) {
@@ -520,8 +563,52 @@
this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
}
},
// ChangeCartNum: function(changeValue) {
// //changeValue:是否 加|减
// //获取当前变动属性
// let productSelect = this.productValue[this.attrValue];
// if (this.cart_num) {
// productSelect.cart_num = this.cart_num;
// this.attribute.productSelect.cart_num = this.cart_num;
// }
// //如果没有属性,赋值给商品默认库存
// if (productSelect === undefined && !this.attribute.productAttr.length)
// productSelect = this.attribute.productSelect;
// //无属性值即库存为0不存在加减
// if (productSelect === undefined) return;
// let stock = productSelect.stock || 0;
// let num = this.attribute.productSelect;
// let quota = productSelect.quota || 0;
// //设置默认数据
// if (productSelect.cart_num == undefined) productSelect.cart_num = 1;
// if (changeValue) {
// num.cart_num ++;
// if(quota >= stock){
// if (num.cart_num > stock) {
// this.$set(this.attribute.productSelect, "cart_num", stock);
// this.$set(this, "cart_num", stock);
// }
// }else{
// if (num.cart_num > quota) {
// this.$set(this.attribute.productSelect, "cart_num", quota);
// this.$set(this, "cart_num", quota);
// }
// }
// this.$set(this, "cart_num", num.cart_num);
// this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
// } else {
// num.cart_num--;
// if (num.cart_num < 1) {
// this.$set(this.attribute.productSelect, "cart_num", 1);
// this.$set(this, "cart_num", 1);
// }
// this.$set(this, "cart_num", num.cart_num);
// this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
// }
// },
attrVal(val) {
this.attribute.productAttr[val.indexw].index = this.attribute.productAttr[val.indexw].attr_values[val.indexn];
this.attribute.productAttr[val.indexw].index = this.attribute.productAttr[val.indexw].attrValues[val.indexn];
},
/**
* 属性变动赋值
@@ -534,12 +621,11 @@
this.$set(this.attribute.productSelect, "image", productSelect.image);
this.$set(this.attribute.productSelect, "price", productSelect.price);
this.$set(this.attribute.productSelect, "stock", productSelect.stock);
this.$set(this.attribute.productSelect, "unique", productSelect.unique);
this.$set(this.attribute.productSelect, "unique", productSelect.id);
this.$set(this.attribute.productSelect, "cart_num", 1);
this.$set(this.attribute.productSelect, "quota", productSelect.quota);
this.$set(this.attribute.productSelect, "quota_show", productSelect.quota_show);
this.$set(this.attribute.productSelect, "quotaShow", productSelect.quotaShow);
this.$set(this, "attrValue", res);
this.attrTxt = "已选择"
} else {
this.$set(this.attribute.productSelect, "image", this.storeInfo.image);
@@ -548,7 +634,7 @@
this.$set(this.attribute.productSelect, "unique", "");
this.$set(this.attribute.productSelect, "cart_num", 0);
this.$set(this.attribute.productSelect, "quota", 0);
this.$set(this.attribute.productSelect, "quota_show", 0);
this.$set(this.attribute.productSelect, "quotaShow", 0);
this.$set(this, "attrValue", "");
this.attrTxt = "已选择"
@@ -612,11 +698,11 @@
setCollect: function() {
var that = this;
if (this.storeInfo.userCollect) {
collectDel(this.storeInfo.product_id).then(res => {
collectDel(this.storeInfo.productId).then(res => {
that.storeInfo.userCollect = !that.storeInfo.userCollect
})
} else {
collectAdd(this.storeInfo.product_id).then(res => {
collectAdd(this.storeInfo.productId).then(res => {
that.storeInfo.userCollect = !that.storeInfo.userCollect
})
}
@@ -626,7 +712,7 @@
*/
openAlone: function() {
uni.navigateTo({
url: `/pages/goods_details/index?id=${this.storeInfo.product_id}`
url: `/pages/goods_details/index?id=${this.storeInfo.productId}`
})
},
/*
@@ -635,6 +721,12 @@
goCat: function() {
var that = this;
var productSelect = this.productValue[this.attrValue];
var productSelect = this.productValue[this.attrValue];
if (that.cart_num > 1) {
return this.$util.Tips({
title: `该商品每人限购1${this.storeInfo.unitName}`
});
}
//打开属性
if (this.isOpen)
this.attribute.cartAttr = true
@@ -647,17 +739,17 @@
title: '请选择属性'
});
postCartAdd({
productId: that.storeInfo.product_id,
secKillId: that.id,
bargainId: 0,
combinationId: 0,
cartNum: that.cart_num,
uniqueId: productSelect !== undefined ? productSelect.unique : '',
'new': 1
productId: that.storeInfo.productId,
isNew: true,
seckillId: Number(that.id),
// bargainId: 0,
// combinationId: 0,
cartNum: that.cart_num ? this.cart_num : this.attribute.productSelect.cart_num,
productAttrUnique: productSelect !== undefined ? productSelect.id : this.aloneAttrValueId,
}).then(res => {
this.isOpen = false
uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + res.data.cartId
url: '/pages/users/order_confirm/index?cartId=' + res.data.cartId + '&secKill=true'
});
}).catch(err => {
return this.$util.Tips({
@@ -694,7 +786,7 @@
},
//隐藏海报
posterImageClose: function() {
this.posterImageStatus = false
this.canvasStatus = false
},
//替换安全域名
setDomain: function(url) {
@@ -746,14 +838,11 @@
that.$set(that, 'PromotionCode', '');
});
},
getImageBase64: function() {
getImageBase64:function(images){
let that = this;
imageBase64(that.storeImage, that.PromotionCode)
.then(res => {
that.storeImage = res.data.image;
that.PromotionCode = res.data.code;
})
.catch(() => {});
imageBase64({url:images}).then(res=>{
that.imgTop = res.data.code
})
},
// 小程序关闭分享弹窗;
goFriend: function() {
@@ -765,59 +854,50 @@
goPoster: function() {
let that = this;
that.posters = false;
that.$set(that, 'canvasStatus', true);
let arr2 = [that.posterbackgd, that.storeImage, that.PromotionCode];
// #ifndef H5
if (that.isDown) return that.$util.Tips({
title: '正在下载海报,请稍后再试!'
});
// #endif
uni.getImageInfo({
src: that.PromotionCode,
fail: function(res) {
return that.$util.Tips({
title: '小程序二维码需要发布正式版后才能获取到'
});
},
success() {
if (arr2[2] == '') {
//海报二维码不存在则从新下载
// #ifndef H5
that.downloadFilePromotionCode(function(msgPromotionCode) {
arr2[2] = msgPromotionCode;
if (arr2[2] == '')
return that.$util.Tips({
title: '海报二维码生成失败!'
});
that.$util.PosterCanvas(arr2, that.storeInfo.title, that.storeInfo.price, function(tempFilePath) {
that.$set(that, 'posterImage', tempFilePath);
that.$set(that, 'posterImageStatus', true);
that.$set(that, 'canvasStatus', false);
that.$set(that, 'actionSheetHidden', !that.actionSheetHidden);
});
});
// #endif
// #ifdef H5
that.$util.PosterCanvas(arr2, that.storeInfo.title, that.storeInfo.price, function(tempFilePath) {
that.$set(that, 'posterImage', tempFilePath);
that.$set(that, 'posterImageStatus', true);
that.$set(that, 'canvasStatus', false);
that.$set(that, 'actionSheetHidden', !that.actionSheetHidden);
});
// #endif
} else {
//生成推广海报
that.$util.PosterCanvas(arr2, that.storeInfo.title, that.storeInfo.price, function(tempFilePath) {
that.$set(that, 'posterImage', tempFilePath);
that.$set(that, 'posterImageStatus', true);
that.$set(that, 'canvasStatus', false);
that.$set(that, 'actionSheetHidden', !that.actionSheetHidden);
});
}
},
let arrImages = [that.posterbackgd, that.imgTop, that.PromotionCode];
let storeName = that.storeInfo.storeName;
let price = that.storeInfo.price;
that.$util.PosterCanvas(arrImages, storeName, price, function(tempFilePath) {
that.posterImage = tempFilePath;
that.canvasStatus = true;
});
},
// 小程序二维码
getQrcode(){
let that = this;
let data = {
pid: that.uid,
id: that.id,
path: '/pages/goods_seckill_details/index'
}
getQrcode(data).then(res=>{
that.PromotionCode = res.data.code;
})
},
// 生成二维码;
make() {
let that = this;
let href = location.href;
let hrefs = href.indexOf("?") === -1 ? href + "?spread=" + uid : href + "&spread=" + that.uid;
uQRCode.make({
canvasId: 'qrcode',
text: hrefs,
size: that.qrcodeSize,
margin: 10,
success: res => {
that.PromotionCode = res;
},
complete: (res) => {
},
fail:res=>{
that.$util.Tips({
title: '海报二维码生成失败!'
});
}
})
},
/*
* 保存到手机相册
*/
@@ -879,8 +959,8 @@
href + "&spread=" + res.data.uid;
let configAppMessage = {
desc: data.store_info,
title: data.store_name,
desc: data.storeInfo,
title: data.storeName,
link: href,
imgUrl: data.image
};
@@ -892,7 +972,7 @@
}
</script>
<style>
<style scoped lang="scss">
.generate-posters {
width: 100%;
height: 170rpx;
@@ -1146,8 +1226,9 @@
background: #bbbbbb !important;
}
.canvas {
width: 750px;
height: 1190px;
position:fixed;
z-index: -5;
opacity: 0;
}
.poster-pop {

View File

@@ -122,7 +122,7 @@
that.delivery = res.data;
},
error => {
that.$dialog.error(error.msg);
that.$dialog.error(error);
}
);
},
@@ -133,7 +133,7 @@
that.logistics = res.data;
},
error => {
that.$dialog.error(error.msg);
that.$dialog.error(error);
}
);
},
@@ -183,7 +183,7 @@
setAdminOrderDelivery(item).then(
res => {
that.$util.Tips({
title:res.msg,
title:res,
icon:'success',
mask:true
})
@@ -192,7 +192,7 @@
},2000)
},
error => {
that.$dialog.error(error.msg);
that.$dialog.error(error);
}
);
},

View File

@@ -115,7 +115,7 @@
},
err => {
that.$util.Tips({
title: error.msg
title: error
})
}
);
@@ -133,7 +133,7 @@
},
error => {
that.$util.Tips({
title: error.msg
title: error
})
},
300

View File

@@ -296,7 +296,7 @@
res => {
that.change = false;
that.$util.Tips({
title: res.msg
title: res
});
that.getIndex();
},
@@ -319,7 +319,7 @@
res => {
that.change = false;
this.$util.Tips({
title: res.msg,
title: res,
icon: 'success'
})
that.getIndex();
@@ -339,7 +339,7 @@
}).then(
res => {
this.$util.Tips({
title: res.msg,
title: res,
icon: 'success'
});
this.getIndex();

View File

@@ -155,7 +155,7 @@
that.where.page = that.where.page + 1;
},
err => {
that.$dialog.error(err.msg);
that.$dialog.error(err);
}
);
},
@@ -224,7 +224,7 @@
setOrderRefund(data).then(
res => {
that.change = false;
that.$util.Tips({title: res.msg});
that.$util.Tips({title: res});
that.init();
},
err => {
@@ -245,7 +245,7 @@
res => {
that.change = false;
this.$util.Tips({
title:res.msg,
title:res,
icon:'success'
})
that.init();

View File

@@ -128,7 +128,7 @@
self.verify_code = ''
self.iShidden = false
self.$util.Tips({
title: res.msg
title: res
});
})
.catch(res => {

View File

@@ -218,7 +218,7 @@
that.showLineA("canvasLineA", that.LineA);
},
error => {
that.$dialog.error(error.msg);
that.$dialog.error(error);
}
);
},
@@ -316,7 +316,7 @@
that.filter.page = that.filter.page + 1;
},
error => {
that.$dialog.message(error.msg);
that.$dialog.message(error);
}
);
},

View File

@@ -399,7 +399,7 @@
this.$dialog.error("连接失败");
});
this.$on("err_tip", data => {
this.$dialog.error(data.msg);
this.$dialog.error(data);
});
this.$on("socket_open", () => {
this.socket.send({
@@ -486,8 +486,7 @@
},
imageuploaded(res) {
console.log(res)
if (res.status !== 200)
return this.$dialog.error(res.msg || "上传图片失败");
if (res.status !== 200) return this.$dialog.error(res || "上传图片失败");
this.sendMsg(res.data.url, 3);
},
getHistory() {
@@ -513,7 +512,7 @@
})
.catch(err => {
console.log(err);
this.$dialog.error(err.msg || "加载失败");
this.$dialog.error(err || "加载失败");
});
},
focus: function() {

View File

@@ -31,7 +31,7 @@
<view class='label acea-row row-between-wrapper'>
<view>原价:{{storeInfo.otPrice}}</view>
<view>库存:{{storeInfo.stock}}{{storeInfo.unitName}}</view>
<view>销量:{{storeInfo.sales}}{{storeInfo.unitName}}</view>
<view>销量:{{Number(storeInfo.sales) + Number(storeInfo.ficti) || 0}}{{storeInfo.unitName}}</view>
</view>
<!-- <view class='coupon acea-row row-between-wrapper' v-if="storeInfo.give_integral > 0">
<view class='hide line1 acea-row'>
@@ -46,10 +46,10 @@
</view>
<view class='iconfont icon-jiantou'></view>
</view>
<view class="coupon acea-row row-between-wrapper" v-if="activity.length">
<view class="coupon acea-row row-between-wrapper" v-if="activityH5.length">
<view class="line1 acea-row">
<text>&nbsp;&nbsp;&nbsp;</text>
<view v-for='(item,index) in activity' :key='index' @click="goActivity(item)">
<view v-for='(item,index) in activityH5' :key='index' @click="goActivity(item)">
<view v-if="item.type === '1'" :class="index==0?'activity_pin':'' || index==1?'activity_miao':'' || index==2?'activity_kan':''">
<text class="iconfonts iconfont icon-pintuan"></text>
<text class="activity_title"> 参与秒杀</text>
@@ -76,7 +76,7 @@
<view class='userEvaluation' id="past1">
<view class='title acea-row row-between-wrapper'>
<view>用户评价({{replyCount}})</view>
<navigator class='praise' hover-class='none' :url='"/pages/users/goods_comment_list/index?product_id="+id'>
<navigator class='praise' hover-class='none' :url='"/pages/users/goods_comment_list/index?productId="+id'>
<text class='font-color'>{{replyChance}}%</text>好评率
<text class='iconfont icon-jiantou'></text>
</navigator>
@@ -100,9 +100,9 @@
<view class="item" v-for="(val,indexn) in item.list" :key="indexn" @click="goDetail(val)">
<view class="pictrue">
<image :src="val.image"></image>
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '1'">秒杀</span>
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '2'">砍价</span>
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '3'">拼团</span>
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '1'">秒杀</span>
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '2'">砍价</span>
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '3'">拼团</span>
</view>
<view class="name line1">{{val.storeName}}</view>
<view class="money font-color">¥{{val.price}}</view>
@@ -326,7 +326,7 @@
description: '',
navActive: 0,
H5ShareBox: false, //公众号分享图片
activity: [],
activityH5: [],
retunTop: true, //顶部返回
navH: "",
navList: [],
@@ -451,7 +451,7 @@
let item = e;
if (item.type === "1") {
uni.navigateTo({
url: `/pages/activity/goods_seckill_details/index?id=${item.id}&time=${item.time}&status=1`
url: `/pages/activity/goods_seckill_details/index?id=${item.id}&time=${item.time}&status=2`
});
} else if (item.type === "2") {
uni.navigateTo({
@@ -508,36 +508,36 @@
*去商品详情页
*/
goDetail(item) {
if(!item.activity){
if(!item.activityH5){
uni.redirectTo({
url: '/pages/goods_details/index?id=' + item.id
})
return
}
if (item.activity.length == 0) {
if (item.activityH5.length == 0) {
uni.redirectTo({
url: '/pages/goods_details/index?id=' + item.id
})
return
}
// 砍价
if (item.activity && item.activity.type == 2) {
if (item.activityH5 && item.activityH5.type == 2) {
uni.redirectTo({
url: `/pages/activity/goods_bargain_details/index?id=${item.activity.id}&bargain=${this.uid}`
url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&bargain=${this.uid}`
})
return
}
// 拼团
if (item.activity && item.activity.type == 3) {
if (item.activityH5 && item.activityH5.type == 3) {
uni.redirectTo({
url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`
url: `/pages/activity/goods_combination_details/index?id=${item.activityH5.id}`
})
return
}
// 秒杀
if (item.activity && item.activity.type == 1) {
if (item.activityH5 && item.activityH5.type == 1) {
uni.redirectTo({
url: `/pages/activity/goods_seckill_details/index?id=${item.activity.id}&time=${item.activity.time}&status=1`
url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}&time=${item.activityH5.time}&status=2`
})
return
}
@@ -668,10 +668,9 @@
that.$set(that, 'description', storeInfo.content);
that.$set(that.attr, 'productAttr', res.data.productAttr);
that.$set(that, 'productValue', res.data.productValue);
that.$set(that.sharePacket, 'priceName', res.data.priceName);
that.$set(that.sharePacket, 'priceName', res.data.priceName);
that.$set(that, 'systemStore', res.data.system_store);
that.$set(that, 'good_list', goodArray);
that.$set(that, 'good_list', goodArray);
that.$set(that, 'activityH5', res.data.storeInfo.activityAllH5 ? res.data.storeInfo.activityAllH5 : []);
uni.setNavigationBarTitle({
title: storeInfo.storeName.substring(0, 7) + "..."
@@ -783,6 +782,7 @@
*/
DefaultSelect: function() {
let productAttr = this.attr.productAttr;
let value = [];
console.log(this.productValue)
for (let key in this.productValue) {
if (this.productValue[key].stock > 0) {
@@ -994,7 +994,7 @@
})
.catch(res => {
that.isOpen = false;
return that.$util.Tips({
return that.$util.Tips({
title: res
});
});
@@ -1117,6 +1117,7 @@
make(uid) {
let that = this;
let href = location.href;
href = href.indexOf("?") === -1 ? href + "?spread=" + uid : href + "&spread=" + uid;
console.log(href)
uQRCode.make({
canvasId: 'qrcode',

View File

@@ -99,9 +99,9 @@
<view class="item" v-for="(val,indexn) in item.list" :key="indexn" @click="goDetail(val)">
<view class="pictrue">
<image :src="val.image"></image>
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '1'">秒杀</span>
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '2'">砍价</span>
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '3'">拼团</span>
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '1'">秒杀</span>
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '2'">砍价</span>
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '3'">拼团</span>
</view>
<view class="name line1">{{val.storeName}}</view>
<view class="money font-color">¥{{val.price}}</view>
@@ -948,7 +948,7 @@
.catch(res => {
that.isOpen = false;
return that.$util.Tips({
title: res.msg
title: res
});
});
},

View File

@@ -29,9 +29,9 @@
<view class='item' :class='is_switch==true?"":"on"' hover-class='none' v-for="(item,index) in productList" :key="index" @click="godDetail(item)">
<view class='pictrue' :class='is_switch==true?"":"on"'>
<image :src='item.image' :class='is_switch==true?"":"on"'></image>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activity && item.activity.type === '1'">秒杀</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activity && item.activity.type === '2'">砍价</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activity && item.activity.type === '3'">拼团</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
</view>
<view class='text' :class='is_switch==true?"":"on"'>
<view class='name line1'>{{item.storeName}}</view>
@@ -40,7 +40,7 @@
<view class='vip-money' v-if="item.vip_price && item.vip_price > 0">{{item.vip_price}}
<image src='../../static/images/vip.png'></image>
</view>
<view>已售{{item.sales}}{{item.unitName}}</view>
<view>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}}</view>
</view>
</view>
</view>

View File

@@ -154,9 +154,9 @@
<view class="list-box animated" :class='tempArr.length > 0?"fadeIn on":""'>
<view class="item" v-for="(item,index) in tempArr" :key="index" @click="goDetail(item)">
<view class="pictrue">
<span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '1'">秒杀</span>
<span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '2'">砍价</span>
<span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '3'">拼团</span>
<span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
<span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
<span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
<image :src="item.image" mode=""></image>
</view>
<view class="text-info">
@@ -177,6 +177,40 @@
</view>
</view>
</view>
<!-- 秒杀 -->
<view class="spike-box" :style="" v-if="spikeList.length>0">
<view class="hd">
<view class="left">
<image :src="imgUrl" class="icon" v-if="imgUrl"></image>
<image src="/static/images/spike-icon-002.gif" class="icon" v-else></image>
<view class="name">限时秒杀</view>
<!-- <image src="/static/images/spike-icon-001.png" class="title"></image> -->
<countDown :is-day="false" :tip-text="' '" :day-text="' '" :hour-text="' : '" :minute-text="' : '" :second-text="' '"
:datatime="datatime" :bgColor="countDownColor" :colors="themeColor"></countDown>
</view>
<navigator class="more" url="/pages/activity/goods_seckill/index">更多 <text class="iconfont icon-jiantou"
hover-class='none'></text></navigator>
</view>
<view class="spike-wrapper">
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex" show-scrollbar="false">
<navigator class="spike-item" :style="'margin-right:'+ lrConfig +'rpx;'" v-for="(item,index) in spikeList" :key="index" :url="'/pages/activity/goods_seckill_details/index?id='+item.id+'&time='+datatime+'&status=1'"
hover-class='none'>
<view class="img-box">
<image :src="item.image" mode=""></image>
<view class="msg flex-aj-center" :style="'color:'+ themeColor +';border-color:'+ themeColor +';'">{{item.discountNum}}折起</view>
</view>
<view class="info">
<view class="name line1">{{item.title}}</view>
<view class="price-box">
<text class="tips" :style="'background-color:'+ themeColor +';'"></text>
<text class="price" :style="'color:'+themeColor+';'"><text></text>{{item.price}}</text>
</view>
</view>
</navigator>
</scroll-view>
</view>
</view>
<!-- 分类页 -->
<view class="productList" v-if="navIndex>0" :style="'margin-top:'+prodeuctTop+'px'">
<block v-if="sortProduct.length>0">
@@ -185,18 +219,18 @@
@click="godDetail(item)">
<view class='pictrue' :class='is_switch==true?"":"on"'>
<image :src='item.image' :class='is_switch==true?"":"on"'></image>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activity && item.activity.type === '1'">秒杀</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activity && item.activity.type === '2'">砍价</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activity && item.activity.type === '3'">拼团</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
</view>
<view class='text' :class='is_switch==true?"":"on"'>
<view class='name line1'>{{item.store_name}}</view>
<view class='name line1'>{{item.storeName}}</view>
<view class='money font-color' :class='is_switch==true?"":"on"'><text class='num'>{{item.price}}</text></view>
<view class='vip acea-row row-between-wrapper' :class='is_switch==true?"":"on"'>
<view class='vip-money' v-if="item.vip_price && item.vip_price > 0">{{item.vip_price}}
<view class='vip-money' v-if="item.vipPrice && item.vipPrice > 0">{{item.vipPrice}}
<image src='../../static/images/vip.png'></image>
</view>
<view>已售{{item.sales}}</view>
<view>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}</view>
</view>
</view>
</view>
@@ -231,6 +265,10 @@
getIndexData,
getCoupons
} from '@/api/api.js';
import {
getSeckillHeaderApi,
getSeckillList
} from '@/api/activity.js';
// #ifdef MP-WEIXIN
import {
getTemlIds
@@ -372,7 +410,8 @@
pageInfo: '', // 精品推荐全数据
site_name: '', //首页title
iSshowH: false,
configApi: {} //分享类容配置
configApi: {} ,//分享类容配置
spikeList: [], // 秒杀
}
},
onLoad() {
@@ -385,6 +424,7 @@
} catch {}
}
});
this.getSeckillIndexTime();
let self = this
// #ifdef MP
// 获取小程序头部高度
@@ -413,6 +453,30 @@
})
},
methods: {
getSeckillIndexTime() {
let limit = this.$config.LIMIT;
let params = {
page: 1,
limit: limit,
type: 'index'
}
getSeckillHeaderApi().then(res => {
this.datatime = res.data.seckillTime[res.data.seckillTimeIndex].timeSwap
let id = res.data.seckillTime[res.data.seckillTimeIndex].id
getSeckillList(id, params).then(({
data
}) => {
console.log(data)
data.list.forEach((item) => {
let num = 0
if (item.price > 0 && item.otPrice > 0) num = ((parseFloat(item.price) / parseFloat(item.otPrice)).toFixed(
2))
item.discountNum = this.$util.$h.Mul(num, 10)
})
this.spikeList = data
})
})
},
// #ifdef MP
getTemlIds() {
for (var i in arrTemp) {
@@ -698,7 +762,7 @@
},
// 首发新品详情
goDetail(item) {
if (item.activity && item.activity.type === "2" && !this.isLogin) {
if (item.activityH5 && item.activityH5.type === "2" && !this.isLogin) {
// #ifdef H5
uni.showModal({
title: '提示',

View File

@@ -278,7 +278,7 @@
})
.catch(res => {
return that.$util.Tips({
title: res.msg
title: res
});
});
},
@@ -473,11 +473,9 @@
selectValue = that.selectValue;
if (selectValue.length > 0) {
let selectValueProductId = that.getSelectValueProductId();
console.log('selectValueProductId');
console.log(selectValueProductId.join(','));
collectAll(that.getSelectValueProductId()).then(res => {
return that.$util.Tips({
title: res.msg,
title: res,
icon: 'success'
});
}).catch(err => {
@@ -705,7 +703,10 @@
let newArr = validList.filter(item => item.attrStatus);
that.isAllSelect = newArr.length == selectValue.length && newArr.length;
that.switchSelect();
}).catch(function() {
}).catch(function(err) {
that.$util.Tips({
title: err
});
that.loading = false;
that.loadTitle = '加载更多';
})

View File

File diff suppressed because it is too large Load Diff

View File

@@ -970,12 +970,15 @@
orderCancel(self.orderInfo.id)
.then((data) => {
self.$util.Tips({
title: '删除成功'
title: '取消成功'
}, {
tab: 3
})
})
.catch(() => {
self.$util.Tips({
title: err
})
self.getDetail();
});
} else if (res.cancel) {

View File

@@ -79,7 +79,7 @@
})
.then(res => {
that.$util.Tips({
title: res.msg,
title: res,
success: () => {
uni.navigateTo({
url: '/pages/login/index'
@@ -88,9 +88,8 @@
});
})
.catch(res => {
console.log(res);
that.$util.Tips({
title: res.msg
title: res
});
});
},
@@ -105,7 +104,7 @@
registerVerify({ phone: that.account })
.then(res => {
that.$util.Tips({
title: res.msg
title: res
});
that.sendCode();
})

View File

@@ -30,7 +30,7 @@
</view>
<view class="num-wrapper">
<view class="num-item" @click="goMenuPage('/pages/users/user_money/index')">
<text class="num">{{Number(userInfo.nowMoney).toFixed(2) || 0}}</text>
<text class="num">{{userInfo.nowMoney?Number(userInfo.nowMoney).toFixed(2):0}}</text>
<view class="txt">余额</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">

View File

@@ -55,13 +55,13 @@
*/
onLoad: function(options) {
let that = this;
if (!options.product_id) return that.$util.Tips({
if (!options.productId) return that.$util.Tips({
title: '缺少参数'
}, {
tab: 3,
url: 1
});
that.product_id = options.product_id;
that.productId = options.productId;
},
onShow: function() {
this.getProductReplyCount();
@@ -74,7 +74,7 @@
*/
getProductReplyCount: function() {
let that = this;
getReplyConfig(that.product_id).then(res => {
getReplyConfig(that.productId).then(res => {
that.$set(that,'replyData',res.data);
});
},
@@ -87,7 +87,7 @@
if (that.loading) return;
that.loading = true;
that.loadTitle = '';
getReplyList(that.product_id, {
getReplyList(that.productId, {
page: that.page,
limit: that.limit,
type: that.type,

View File

@@ -151,7 +151,7 @@
this.page = this.page + 1;
})
.catch(err => {
this.$dialog.error(err.msg);
this.$dialog.error(err);
});
}
},

View File

@@ -24,7 +24,7 @@
<view class='name'>{{system_store.name}}
<text class='phone'>{{system_store.phone}}</text>
</view>
<view> {{system_store.address}}{{", " + system_store.detailedAddress}}</view>
<view class="line1"> {{system_store.address}}{{", " + system_store.detailedAddress}}</view>
</view>
<view class='iconfont icon-jiantou'></view>
</block>
@@ -271,7 +271,8 @@
from: '',
news: true,
again: false,
addAgain: false
addAgain: false,
secKill: false //是否是秒杀
};
},
computed: mapGetters(['isLogin']),
@@ -296,6 +297,7 @@
this.news = options.new || true;
this.again = options.again || false;
this.addAgain = options.addAgain || false;
this.secKill = options.secKill || false;
if (this.isLogin) {
this.getaddressInfo();
this.getConfirm();
@@ -375,7 +377,11 @@
let list = res.data.list || [];
this.$set(this, 'storeList', list);
this.$set(this, 'system_store', list[0]);
}).catch(err => {})
}).catch(err => {
return this.$util.Tips({
title: err
});
})
},
// 关闭地址弹窗;
changeClose: function() {
@@ -501,7 +507,7 @@
*/
getConfirm: function() {
let that = this;
orderConfirm(that.cartId,that.news,this.addAgain).then(res => {
orderConfirm(that.cartId,that.news,this.addAgain,this.secKill).then(res => {
that.$set(that, 'userInfo', res.data.userInfo);
that.$set(that, 'integral', res.data.userInfo.integral);
that.$set(that, 'cartInfo', res.data.cartInfo);
@@ -512,7 +518,7 @@
that.$set(that, 'priceGroup', res.data.priceGroup);
that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup.totalPrice), parseFloat(res.data
.priceGroup.storePostage)));
that.$set(that, 'seckillId', parseInt(res.data.seckill_id));
that.$set(that, 'seckillId', parseInt(res.data.secKillId));
that.$set(that, 'store_self_mention', res.data.storeSelfMention == 'true'?true:false);
that.cartArr[1].title = '可用余额:' + res.data.userInfo.nowMoney;
that.cartArr[0].payStatus = res.data.payWeixinOpen || 0
@@ -526,15 +532,14 @@
// that.$set(that, 'cartArr', that.cartArr);
that.$set(that, 'ChangePrice', that.totalPrice);
that.getBargainId();
that.getCouponList();
if(!that.secKill) that.getCouponList();
}).catch(err => {
console.log(err, 'err')
// return this.$util.Tips({
// title: err
// }, {
// tab: 3,
// url: 1
// });
return this.$util.Tips({
title: err
}, {
tab: 3,
url: 1
});
});
},
/*

View File

@@ -147,8 +147,6 @@
let that = this;
that.isAsc = isAsc;
that.sort = sortKey+isAsc;
console.log('ppppppp');
console.log(sortKey+isAsc);
that.sortKey = sortKey;
that.page = 1;
that.limit = 20;
@@ -202,10 +200,10 @@
recordListNew = recordList.concat(recordListData);
that.total = res.data.total;
that.totalLevel = res.data.totalLevel;
that.teamCount = that.$util.$h.Add(Number(res.data.total), Number(res.data.totalLevel));
that.teamCount = res.data.count;
that.status = limit > len;
that.page = page + 1;
that.$set(that, 'recordList', recordListNew);
that.$set(that, 'recordList', recordListNew || []);
});
}
},

View File

@@ -27,11 +27,12 @@
</view>
<view class='text line1'>{{child.nickname}}</view>
</view>
<view class='money' v-if="child.type == 'brokerage'">返佣<text class='font-color'>{{child.number}}</text></view>
<view class='money' v-else>暂未返佣<text class='font-color'>{{child.number}}</text></view>
<view class='money'>返佣<text class='font-color'>{{child.number}}</text></view>
<!-- <view class='money' v-if="child.type == 'brokerage'">返佣<text class='font-color'>{{child.number}}</text></view>
<view class='money' v-else>暂未返佣<text class='font-color'>{{child.number}}</text></view> -->
</view>
<view class='bottom'>
<view><text class='name'>订单编号</text>{{child.order_id}}</view>
<view><text class='name'>订单编号</text>{{child.orderId}}</view>
<view><text class='name'>下单时间</text>{{child.time}}</view>
</view>
</view>

View File

@@ -111,7 +111,7 @@
})
.then(res => {
that.$util.Tips({
title: res.msg
title: res.message
}, {
tab: 3
})
@@ -138,7 +138,7 @@
code: that.codeVal
})
.then(res => {
that.$dialog.success(res.msg);
that.$dialog.success(res.message);
that.sendCode();
})
.catch(res => {

View File

@@ -51,6 +51,19 @@
<view class='name'>提现</view>
<view class='input'><input :placeholder='"最低提现金额"+minPrice' placeholder-class='placeholder' name="money" type='digit'></input></view>
</view>
<view class='item acea-row row-top row-between'>
<view class='name'>收款码</view>
<view class="input acea-row">
<view class="picEwm" v-if="qrcodeUrlW">
<image :src="qrcodeUrlW"></image>
<text class='iconfont icon-guanbi1 font-color' @click='DelPicW'></text>
</view>
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic("W")' v-else>
<text class='iconfont icon-icon25201'></text>
<view>上传图片</view>
</view>
</view>
</view>
<view class='tip'>
当前可提现金额: <text class="price">{{commission.commissionCount}},</text>冻结佣金{{commission.brokenCommission}}
</view>
@@ -70,6 +83,19 @@
<view class='name'>提现</view>
<view class='input'><input :placeholder='"最低提现金额"+minPrice' placeholder-class='placeholder' name="money" type='digit'></input></view>
</view>
<view class='item acea-row row-top row-between'>
<view class='name'>收款码</view>
<view class="input acea-row">
<view class="picEwm" v-if="qrcodeUrlZ">
<image :src="qrcodeUrlZ"></image>
<text class='iconfont icon-guanbi1 font-color' @click='DelPicZ'></text>
</view>
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic("Z")' v-else>
<text class='iconfont icon-icon25201'></text>
<view>上传图片</view>
</view>
</view>
</view>
<view class='tip'>
当前可提现金额: <text class="price">{{commission.commissionCount}},</text>冻结佣金{{commission.brokenCommission}}
</view>
@@ -132,7 +158,10 @@
isClone: false,
isAuto: false, //没有授权的不会自动授权
isShowAuth: false, //是否隐藏授权
commission:{}
commission:{},
qrcodeUrlW:"",
qrcodeUrlZ:"",
isCommitted: false //防止多次提交
};
},
computed: mapGetters(['isLogin']),
@@ -140,7 +169,7 @@
if (this.isLogin) {
this.getUserInfo();
this.getUserExtractBank();
this.getBrokerageCommission();
//this.getBrokerageCommission();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
@@ -152,12 +181,37 @@
}
},
methods: {
uploadpic: function (type) {
let that = this;
that.$util.uploadImageOne({
url: 'user/upload/image',
name: 'multipart',
model: "user",
pid: 1
}, function(res) {
if(type==='W'){
that.qrcodeUrlW = res.data.url;
}else{
that.qrcodeUrlZ = res.data.url;
}
});
},
/**
* 删除图片
*
*/
DelPicW: function () {
this.qrcodeUrlW = "";
},
DelPicZ: function () {
this.qrcodeUrlZ = "";
},
onLoadFun: function() {
this.getUserInfo();
this.getUserExtractBank();
this.getBrokerageCommission();
// this.getBrokerageCommission();
},
getBrokerageCommission(){
getBrokerageCommission: function(){
brokerageCommission().then(res=>{
this.commission = res.data;
})
@@ -194,48 +248,55 @@
subCash: function(e) {
let that = this,
value = e.detail.value;
if (that.currentTab == 0) { //银行卡
if (value.name.length == 0) return this.$util.Tips({
title: '请填写持卡人姓名'
if (that.currentTab == 0) { //银行卡
if (value.name.length == 0) return this.$util.Tips({
title: '请填写持卡人姓名'
});
if (value.cardum.length == 0) return this.$util.Tips({
title: '请填写卡号'
});
if (that.index == 0) return this.$util.Tips({
title: "请选择银行"
});
value.extractType = 'bank';
value.bankName = that.array[that.index];
} else if (that.currentTab == 1) { //微信
value.extractType = 'weixin';
if (value.name.length == 0) return this.$util.Tips({
title: '请填写微信号'
});
value.wechat = value.name;
value.qrcodeUrl = that.qrcodeUrlW;
} else if (that.currentTab == 2) { //支付宝
value.extractType = 'alipay';
if (value.name.length == 0) return this.$util.Tips({
title: '请填写账号'
});
value.alipayCode = value.name;
value.qrcodeUrl = that.qrcodeUrlZ;
}
if (value.money.length == 0) return this.$util.Tips({
title: '请填写提现金额'
});
if (value.cardum.length == 0) return this.$util.Tips({
title: '请填写卡号'
if (value.money < that.minPrice) return this.$util.Tips({
title: '提现金额不能低于' + that.minPrice
});
if (that.index == 0) return this.$util.Tips({
title: "请选择银行"
if(this.isCommitted==false){
this.isCommitted=true;
extractCash(value).then(res => {
that.getUserInfo();
return this.$util.Tips({
title: "提现成功",
icon: 'success'
},{ tab: 2, url: '/pages/users/user_spread_user/index' });
this.isCommitted=false;
}).catch(err => {
this.isCommitted=false;
return this.$util.Tips({
title: err
});
});
value.extractType = 'bank';
value.bankname = that.array[that.index];
} else if (that.currentTab == 1) { //微信
value.extractType = 'weixin';
if (value.name.length == 0) return this.$util.Tips({
title: '请填写微信号'
});
value.wechat = value.name;
} else if (that.currentTab == 2) { //支付宝
value.extractType = 'alipay';
if (value.name.length == 0) return this.$util.Tips({
title: '请填写账号'
});
value.alipayCode = value.name;
}
if (value.money.length == 0) return this.$util.Tips({
title: '请填写提现金额'
});
if (value.money < that.minPrice) return this.$util.Tips({
title: '提现金额不能低于' + that.minPrice
});
extractCash(value).then(res => {
that.getUserInfo();
return this.$util.Tips({
title: "提现成功",
icon: 'success'
},{ tab: 2, url: '/pages/users/user_spread_user/index' });
}).catch(err => {
return this.$util.Tips({
title: err
});
});
}
}
}
@@ -245,22 +306,22 @@
page {
background-color: #fff !important;
}
.cash-withdrawal .nav {
height: 130rpx;
box-shadow: 0 10rpx 10rpx #f8f8f8;
}
.cash-withdrawal .nav .item {
font-size: 26rpx;
flex: 1;
text-align: center;
}
.cash-withdrawal .nav .item~.item {
border-left: 1px solid #f0f0f0;
}
.cash-withdrawal .nav .item .iconfont {
width: 40rpx;
height: 40rpx;
@@ -272,53 +333,87 @@
font-size: 22rpx;
box-sizing: border-box;
}
.cash-withdrawal .nav .item .iconfont.on {
background-color: #e93323;
color: #fff;
border-color: #e93323;
}
.cash-withdrawal .nav .item .line {
width: 2rpx;
height: 20rpx;
margin: 0 auto;
transition: height 0.3s;
}
.cash-withdrawal .nav .item .line.on {
height: 39rpx;
}
.cash-withdrawal .wrapper .list {
padding: 0 30rpx;
}
.cash-withdrawal .wrapper .list .item {
border-bottom: 1rpx solid #eee;
height: 107rpx;
min-height: 28rpx;
font-size: 30rpx;
color: #333;
padding: 39rpx 0;
}
.cash-withdrawal .wrapper .list .item .name {
width: 130rpx;
}
.cash-withdrawal .wrapper .list .item .input {
width: 505rpx;
}
.cash-withdrawal .wrapper .list .item .input .placeholder {
color: #bbb;
}
.cash-withdrawal .wrapper .list .item .picEwm,.cash-withdrawal .wrapper .list .item .pictrue{
width:140rpx;
height:140rpx;
border-radius:3rpx;
position: relative;
margin-right: 23rpx;
}
.cash-withdrawal .wrapper .list .item .picEwm image{
width:100%;
height:100%;
border-radius:3rpx;
}
.cash-withdrawal .wrapper .list .item .picEwm .icon-guanbi1{
position:absolute;
right: -14rpx;
top: -16rpx;
font-size:40rpx;
}
.cash-withdrawal .wrapper .list .item .pictrue{
border:1px solid rgba(221,221,221,1);
font-size:22rpx;
color: #BBBBBB;
}
.cash-withdrawal .wrapper .list .item .pictrue .icon-icon25201{
font-size: 47rpx;
color: #DDDDDD;
margin-bottom: 3px;
}
.cash-withdrawal .wrapper .list .tip {
font-size: 26rpx;
color: #999;
margin-top: 25rpx;
}
.cash-withdrawal .wrapper .list .bnt {
font-size: 32rpx;
color: #fff;
@@ -329,14 +424,14 @@
line-height: 90rpx;
margin: 64rpx auto;
}
.cash-withdrawal .wrapper .list .tip2 {
font-size: 26rpx;
color: #999;
text-align: center;
margin: 44rpx 0 20rpx 0;
}
.cash-withdrawal .wrapper .list .value {
height: 135rpx;
line-height: 135rpx;
@@ -344,18 +439,18 @@
width: 690rpx;
margin: 0 auto;
}
.cash-withdrawal .wrapper .list .value input {
font-size: 80rpx;
color: #282828;
height: 135rpx;
text-align: center;
}
.cash-withdrawal .wrapper .list .value .placeholder2 {
color: #bbb;
}
.price {
color: $theme-color;
}

View File

@@ -198,7 +198,7 @@
});
}).catch(msg => {
return that.$util.Tips({
title: msg.message || '保存失败,您并没有修改'
title: msg || '保存失败,您并没有修改'
}, {
tab: 3,
url: 1

View File

@@ -243,7 +243,7 @@
},
fail: function(res) {
return that.$util.Tips({
title: res.errMsg
title: res
});
},
complete: function(res) {},
@@ -279,7 +279,7 @@
},
fail: function(res) {
return that.$util.Tips({
title: res.errMsg
title: res
});
},
complete: function(res) {},
@@ -292,13 +292,13 @@
})
} else {
return that.$util.Tips({
title: resFile.errMsg
title: resFile
});
}
},
fail(res) {
return that.$util.Tips({
title: res.errMsg
title: res
});
}
})

View File

@@ -11,7 +11,31 @@
<view class='iconfont icon-jinbi1'></view>
</view>
</view>
<view class='sign-record'>
<view class='sign-record' v-if="recordType == 4">
<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
<view class='list'>
<view class='item'>
<view class='data'>{{item.date}}</view>
<view class='listn'>
<block v-for="(child,indexn) in item.list" :key="indexn">
<view class='itemn acea-row row-between-wrapper'>
<view>
<view class='name line1'>{{child.status === -1 ? '提现失败' : '提现成功'}}<span v-show="child.status === -1" style="font-size: 12px;color: red;">{{'('+child.failMsg+')'}}</span></view>
<view>{{child.createTime}}</view>
</view>
<view class='num font-color' v-if="child.status == -1">+{{child.extractPrice}}</view>
<view class='num' v-else>-{{child.extractPrice}}</view>
</view>
</block>
</view>
</view>
</view>
</block>
<view v-if="recordList.length == 0">
<emptyPage title='暂无提现记录~'></emptyPage>
</view>
</view>
<view class='sign-record' v-else>
<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
<view class='list'>
<view class='item'>
@@ -46,7 +70,9 @@
<script>
import {
getCommissionInfo,
getSpreadInfo
getSpreadInfo,
getRecordApi,
getCountApi
} from '@/api/user.js';
import {
toLogin
@@ -104,8 +130,8 @@
});
this.name = '提现总额';
this.recordType = 4;
this.getRecordList();
this.getRecordListCount();
this.getList();
this.getCount();
} else if (type == 2) {
uni.setNavigationBarTitle({
title: "佣金记录"
@@ -146,6 +172,35 @@
authColse: function(e) {
this.isShowAuth = e
},
getList: function() {
let that = this;
let recordList = that.recordList;
let recordListNew = [];
if (that.status == true) return;
getRecordApi({
page: that.page,
limit: that.limit
}).then(res => {
console.log(res)
let len = res.data.list.length;
let recordListData = res.data.list;
recordListNew = recordList.concat(recordListData);
that.status = that.limit > len;
that.page = that.page + 1;
that.$set(that, 'recordList', recordListNew);
console.log(that.recordList)
});
},
getCount: function() {
let that = this;
if (status == true) return;
getCountApi({
page: that.page,
limit: that.limit
}).then(res => {
that.extractCount = res.data.count;
});
},
getRecordList: function() {
let that = this;
let page = that.page;

View File

@@ -10,11 +10,11 @@
<view class='profit acea-row row-between-wrapper'>
<view class='item'>
<view>昨日收益</view>
<view class='money'>{{spreadInfo.lastDayCount}}</view>
<view class='money'>{{spreadInfo.lastDayCount ? Number(spreadInfo.lastDayCount).toFixed(2) : 0}}</view>
</view>
<view class='item'>
<view>累积已提</view>
<view class='money'>{{spreadInfo.extractCount}}</view>
<view class='money'>{{spreadInfo.extractCount ? Number(spreadInfo.extractCount).toFixed(2) : 0}}</view>
</view>
</view>
</view>

View File

@@ -167,7 +167,7 @@
that.levelInfo = res.data.experience;
}).catch(function(res) {
return that.$util.Tips({
title: res.msg
title: res
});
})
},
@@ -195,7 +195,7 @@
}).catch(function(res) {
return that.$util.Tips({
title: res.msg
title: res
});
})
},

View File

@@ -248,7 +248,7 @@
time: time
});
self.$util.Tips({
title:res.msg,
title:res,
icon:'success'
},{
tab:3
@@ -259,7 +259,7 @@
.catch(res => {
uni.hideLoading();
uni.showToast({
title: res.msg,
title: res,
icon: 'none',
duration: 2000
});