更新Note

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

29
App.vue
View File

@ -1,4 +1,10 @@
<!-- <template>
<view>
<iframe ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
scrolling="no" src="https://java.crmeb.net">
</iframe>
</view>
</template> -->
<script>
import { checkLogin } from "./libs/login";
import { HTTP_REQUEST_URL } from './config/app';
@ -49,6 +55,20 @@
},
mounted() {
},
onShow: function() {
// #ifdef H5
uni.getSystemInfo({
success(e){
/* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
if(e.windowWidth>420 && !window.top.isPC && !/iOS|Android/i.test(e.system)){
// window.location.pathname = 'https://java.crmeb.net/';
/* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
window.location.pathname = '/static/html/pc.html';
}
}
})
// #endif
},
onHide: function() {
//console.log('App Hide')
}
@ -61,6 +81,13 @@
@import 'static/iconfont/iconfont.css';
@import 'static/css/guildford.css';
@import 'static/css/style.scss';
/* 条件编译仅在H5平台生效 */
// #ifdef H5
body::-webkit-scrollbar,html::-webkit-scrollbar {
display: none;
}
// #endif
view{
box-sizing: border-box;
}

View File

@ -180,3 +180,11 @@ export function seckillCode(id,data) {
export function scombinationCode(id) {
return request.get("combination/code/"+id);
}
/**
* 秒杀产品时间区间
* @param int id
*/
export function getSeckillHeaderApi(){
return request.get('seckill/index',{},{noAuth:true});
}

View File

@ -168,11 +168,12 @@ export function orderRefundVerify(data) {
* 订单确认获取订单详细信息
* @param string cartId
*/
export function orderConfirm(cartId, isNew, addAgain) {
export function orderConfirm(cartId, isNew, addAgain,secKill) {
return request.post('order/confirm', {
cartIds: cartId,
isNew: isNew,
addAgain: addAgain
addAgain: addAgain,
secKill: secKill
}, {}, 1);
}

View File

@ -57,7 +57,7 @@ export function collectDel(id, category) {
*
*/
export function postCartAdd(data) {
return request.post('cart/save', data, {},1);
return request.post('cart/save', data, {});
}
/**

View File

@ -128,6 +128,20 @@ export function getCommissionInfo(q, types) {
return request.get("spread/commission/" + types, q);
}
/*
* 提现记录 getCountApi
* */
export function getRecordApi(q) {
return request.get("extract/record", q);
}
/*
* 提现总金额
* */
export function getCountApi() {
return request.get("extract/totalMoney");
}
/*
* 积分记录
* */

View File

@ -88,7 +88,7 @@
}).catch(res=>{
uni.hideLoading();
uni.showToast({
title:res.msg,
title:res.message,
icon:'none',
duration:2000
});

View File

@ -4,18 +4,18 @@
<view @click="goDetail(item)" class='item acea-row row-between-wrapper' hover-class="none">
<view class='pictrue'>
<image :src='item.image'></image>
<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>
</view>
<view class='underline'>
<view class='text'>
<view class='line1'>{{item.storeName}}</view>
<view class='money font-color'><text class='num'>{{item.price}}</text></view>
<view class='vip-money acea-row row-middle' v-if="item.vip_price && item.vip_price > 0">{{item.vip_price || 0}}
<image src='../../static/images/vip.png'></image><text class='num'>已售{{item.sales}}{{item.unitName}}</text>
<image src='../../static/images/vip.png'></image><text class='num'>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}}</text>
</view>
<view class='vip-money acea-row row-middle' v-else><text class='num'>已售{{item.sales}}{{item.unitName}}</text></view>
<view class='vip-money acea-row row-middle' v-else><text class='num'>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}}</text></view>
</view>
</view>
<view class='iconfont icon-gouwuche cart-color acea-row row-center-wrapper'></view>

View File

@ -61,7 +61,7 @@
};
},
mounted(){
this.videoContext = uni.createVideoContext('myVideo',this);
//this.videoContext = uni.createVideoContext('myVideo',this);
},
methods: {
bindPause:function(){

View File

@ -12,46 +12,49 @@
<view class="money font-color">
<text class="num">{{ attr.productSelect.price }}</text>
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
<text class='stock' v-if="limitNum">: {{attr.productSelect.quota_show}}</text>
<text class='stock' v-if="limitNum">: {{attr.productSelect.quotaShow}}</text>
</view>
</view>
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
</view>
<view class="productWinList">
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
<view class="title">{{ item.attrName }}</view>
<view class="listn acea-row row-middle">
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''" v-for="(itemn, indexn) in item.attrValue"
@click="tapAttr(indexw, indexn)" :key="indexn">
{{ itemn.attr }}
<view class="rollTop">
<view class="productWinList">
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
<view class="title">{{ item.attrName }}</view>
<view class="listn acea-row row-middle">
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''" v-for="(itemn, indexn) in item.attrValue"
@click="tapAttr(indexw, indexn)" :key="indexn">
{{ itemn.attr }}
</view>
</view>
</view>
</view>
</view>
<view class="cart">
<view class="title">数量</view>
<view class="carnum acea-row row-left">
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
-
<view class="cart acea-row row-between-wrapper">
<view class="title">数量</view>
<view class="carnum acea-row row-left">
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
-
</view>
<view class='item num'>
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num" @input="bindCode(attr.productSelect.cart_num)"></input>
</view>
<view v-if="iSplus" class="item plus" :class="
attr.productSelect.cart_num >= attr.productSelect.stock
? 'on'
: ''
"
@click="CartNumAdd">
+
</view>
<view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota) || (attr.productSelect.cart_num >= attr.productSelect.stock) || (attr.productSelect.cart_num >= attr.productSelect.num)? "on":""' @click='CartNumAdd'>+</view>
</view>
<view class='item num'>
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num" @input="bindCode(attr.productSelect.cart_num)"></input>
</view>
<view v-if="iSplus" class="item plus" :class="
attr.productSelect.cart_num >= attr.productSelect.stock
? 'on'
: ''
"
@click="CartNumAdd">
+
</view>
<view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota_show) || (attr.productSelect.cart_num >= attr.productSelect.product_stock)? "on":""' @click='CartNumAdd'>+</view>
</view>
</view>
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.product_stock>0 &&attr.productSelect.quota>0" @click="goCat"></view>
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.product_stock<=0)">已售罄</view>
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0" @click="goCat"></view>
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view>
<view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat"></view>
<view class="joinBnt on" v-else-if="iScart && !attr.productSelect.stock">已售罄</view>
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock && attr.productSelect.quota" @click="goCat"></view>
<view class="joinBnt on" v-else-if="(iScart && !attr.productSelect.stock)">已售罄</view>
</view>
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
</view>
@ -89,6 +92,9 @@
data() {
return {};
},
mounted() {
console.log(this.attr)
},
methods: {
goCat:function(){
this.$emit('goCat');
@ -153,7 +159,7 @@
transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9);
}
.product-window.on {
transform: translate3d(0, 0, 0);
}
@ -164,44 +170,44 @@
padding-bottom: 30rpx;
z-index: 999;
}
.product-window .textpic {
padding: 0 130rpx 0 30rpx;
margin-top: 29rpx;
position: relative;
}
.product-window .textpic .pictrue {
width: 150rpx;
height: 150rpx;
}
.product-window .textpic .pictrue image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
.product-window .textpic .text {
width: 410rpx;
font-size: 32rpx;
color: #202020;
}
.product-window .textpic .text .money {
font-size: 24rpx;
margin-top: 40rpx;
}
.product-window .textpic .text .money .num {
font-size: 36rpx;
}
.product-window .textpic .text .money .stock {
color: #999;
margin-left: 18rpx;
}
.product-window .textpic .iconfont {
position: absolute;
right: 30rpx;
@ -209,90 +215,98 @@
font-size: 35rpx;
color: #8a8a8a;
}
.product-window .productWinList {
max-height: 395rpx;
.product-window .rollTop{
max-height: 500rpx;
overflow: auto;
margin-top: 36rpx;
}
.product-window .productWinList .item~.item {
margin-top: 36rpx;
}
.product-window .productWinList .item .title {
font-size: 30rpx;
color: #999;
padding: 0 30rpx;
}
.product-window .productWinList .item .listn {
padding: 0 30rpx 0 16rpx;
}
.product-window .productWinList .item .listn .itemn {
border: 1px solid #bbb;
border: 1px solid #F2F2F2;
font-size: 26rpx;
color: #282828;
padding: 7rpx 33rpx;
border-radius: 6rpx;
margin: 14rpx 0 0 14rpx;
border-radius: 25rpx;
margin: 20rpx 0 0 14rpx;
background-color: #F2F2F2;
}
.product-window .productWinList .item .listn .itemn.on {
color: #fff;
background-color: #ff3700;
border-color: #ff3700;
color: #E93323;
background:rgba(255,244,243,1);
border-color: #E93323;
}
.product-window .productWinList .item .listn .itemn.limit {
color: #999;
text-decoration:line-through;
}
.product-window .cart {
margin-top: 36rpx;
padding: 0 30rpx;
}
.product-window .cart .title {
font-size: 30rpx;
color: #999;
}
.product-window .cart .carnum {
height: 54rpx;
margin-top: 24rpx;
}
.product-window .cart .carnum view {
border: 1px solid #a4a4a4;
// border: 1px solid #a4a4a4;
width: 84rpx;
text-align: center;
height: 100%;
line-height: 54rpx;
color: #a4a4a4;
color: #282828;
font-size: 45rpx;
}
.product-window .cart .carnum .reduce {
border-right: 0;
border-radius: 6rpx 0 0 6rpx;
line-height: 48rpx;
}
.product-window .cart .carnum .reduce.on {
border-color: #e3e3e3;
color: #dedede;
// border-color: #e3e3e3;
color: #DEDEDE;
font-size: 60rpx;
}
.product-window .cart .carnum .plus {
border-left: 0;
border-radius: 0 6rpx 6rpx 0;
line-height: 46rpx;
}
.product-window .cart .carnum .plus.on {
border-color: #e3e3e3;
color: #dedede;
}
.product-window .cart .carnum .num {
background:rgba(242,242,242,1);
color: #282828;
font-size: 28rpx;
}

View File

@ -4,9 +4,9 @@
<view class='item acea-row row-between-wrapper' @tap="goDetail(item)" hover-class="none">
<view class='pictrue'>
<image :src='item.image'></image>
<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>
</view>
<view class='text'>
<view class='name line1'>{{item.store_name}}</view>

View File

@ -9,9 +9,9 @@
<view class='item' v-for="(item,index) in hostProduct" :key="index" hover-class='none' @tap="goDetail(item)">
<view class='pictrue'>
<image :src='item.image'></image>
<span class="pictrue_log_big pictrue_log_class" v-if="item.activity && item.activity.type === '1'"></span>
<span class="pictrue_log_big pictrue_log_class" v-if="item.activity && item.activity.type === '2'"></span>
<span class="pictrue_log_big pictrue_log_class" v-if="item.activity && item.activity.type === '3'"></span>
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '1'"></span>
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '2'"></span>
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '3'"></span>
</view>
<view class='name line1'>{{item.storeName}}</view>
<view class='money font-color'><text class='num'>{{item.price}}</text></view>

View File

@ -12,7 +12,7 @@
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;align-items: center; height: 100%;" scroll-with-animation :scroll-left="tabLeft" show-scrollbar="false">
<view class="wrapper">
<view v-for="(item,index) in tabTitle[tabClick].child?tabTitle[tabClick].child:[]" :key="index" class="child-item" :class="{on:index == childIndex}" @click="childTab(tabClick,index)">
<image :src="item.url" mode=""></image>
<image :src="item.extra" mode=""></image>
<view class="txt line1">{{item.name}}</view>
</view>
</view>

View File

@ -12,7 +12,7 @@
</view>
<view class="time">{{ item.createTime }} {{ item.suk }}</view>
<view class="evaluate-infor">{{ item.comment }}</view>
<view class="imgList acea-row">
<view class="imgList acea-row" v-if="item.pics.length && item.pics[0]">
<view class="pictrue" v-for="(itemn, indexn) in item.pics" :key="indexn">
<image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image>
</view>

View File

@ -26,4 +26,6 @@ module.exports = {
TOKENNAME: 'Authori-zation',
// 缓存时间 0 永久
EXPIRE:0,
//分页最多显示条数
LIMIT: 10
};

View File

@ -1,16 +1,16 @@
export function goShopDetail(item,uid) {
return new Promise(resolve => {
if (item.activity && item.activity.type === "1") {
if (item.activityH5 && item.activityH5.type === "1") {
uni.navigateTo({
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`
})
} else if (item.activity && item.activity.type === "2") {
} else if (item.activityH5 && item.activityH5.type === "2") {
uni.navigateTo({
url: `/pages/activity/goods_bargain_details/index?id=${item.activity.id}&bargain=${uid}`
url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&bargain=${uid}`
})
} else if (item.activity && item.activity.type === "3") {
} else if (item.activityH5 && item.activityH5.type === "3") {
uni.navigateTo({
url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`
url: `/pages/activity/goods_combination_details/index?id=${item.activityH5.id}`
})
} else {
resolve(item);

View File

@ -99,6 +99,21 @@ class AuthWechat {
});
}
// 获取经纬度;
location(){
return new Promise((resolve, reject) => {
this.wechat().then(wx => {
this.toPromise(wx.getLocation,{type: 'wgs84'}).then(res => {
resolve(res);
}).catch(err => {
reject(err);
});
}).catch(err => {
reject(err);
})
});
}
/**
* 微信支付
* @param {Object} config

View File

@ -497,7 +497,10 @@
"navigationBarTitleText": "crmeb",
"navigationBarBackgroundColor": "#fff",
"backgroundColor": "#F8F8F8",
"titleNView": false
"titleNView": false,
"rpxCalcMaxDeviceWidth": 960,
"rpxCalcBaseDeviceWidth": 375,
"rpxCalcIncludeWidth": 750
},
"tabBar": {
"color": "#282828",

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.attr, 'productAttr', res.data.productAttr);
that.$set(that, 'productValue', res.data.productValue);
that.$set(that.sharePacket, 'priceName', res.data.priceName);
console.log(that.sharePacket)
that.$set(that, 'systemStore', res.data.system_store);
that.$set(that, 'good_list', goodArray);
that.$set(that, 'activity', res.data.activity ? res.data.activity : []);
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) {
value = this.attr.productAttr.length ? key.split(",") : [];
@ -994,7 +994,7 @@
.catch(res => {
that.isOpen = false;
return that.$util.Tips({
title: res.msg
title: res
});
});
},
@ -1117,6 +1117,7 @@
let that = this;
let href = location.href;
href = href.indexOf("?") === -1 ? href + "?spread=" + uid : href + "&spread=" + uid;
console.log(href)
uQRCode.make({
canvasId: 'qrcode',
text: href,

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 = '加载更多';
})

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
});

58
static/html/pc.html Normal file
View File

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang=zh-CN>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
<title>CRMEB</title>
<meta name="Copyright" content="helang">
<!-- <link rel="shortcut icon" type="image/png" href="/uniapp-extend/static/logo.png"> -->
<meta name="keywords" content="CRMEB">
<meta name="description" content="CRMEB">
<style type="text/css">
body{
margin: 0;
background-color: #fff;
}
iframe{
width: 375px;
height: 667px;
background-color: #fff;
box-sizing: content-box;
border: none;
}
@media screen and (min-width: 450px) {
iframe {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
border: 1px solid #f5f5f5;
border-radius: 4px;
}
}
</style>
<script type="text/javascript">
window.isPC = true;
window.onload = function(){
/* 监听电脑浏览器窗口尺寸改变 */
window.onresize = function(){
/* 窗口宽度 小于或等于420px 时跳转回H5页面 */
if(window.innerWidth <= 420){
// window.location.pathname = 'https://java.crmeb.net/';
/* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
window.location.pathname = '';
}
}
}
</script>
</head>
<body>
<!-- <iframe src="https://java.crmeb.net/"></iframe> -->
<!--若你的项目未设置根目录(默认为 / 时),则使用下方代码-->
<iframe src="/"></iframe>
</body>
</html>

View File

@ -363,7 +363,7 @@ import {
} else {
errorCallback && errorCallback(data);
that.Tips({
title: data.msg
title: data.message
});
}
}
@ -618,6 +618,23 @@ import {
}
return status;
},
}
},
toStringValue: function(obj) {
if (obj instanceof Array) {
var arr = [];
for (var i = 0; i < obj.length; i++) {
arr[i] = toStringValue(obj[i]);
}
return arr;
} else if (typeof obj == 'object') {
for (var p in obj) {
obj[p] = toStringValue(obj[p]);
}
} else if (typeof obj == 'number') {
obj = obj + '';
}
return obj;
}
}