更新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> <script>
import { checkLogin } from "./libs/login"; import { checkLogin } from "./libs/login";
import { HTTP_REQUEST_URL } from './config/app'; import { HTTP_REQUEST_URL } from './config/app';
@ -49,6 +55,20 @@
}, },
mounted() { 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() { onHide: function() {
//console.log('App Hide') //console.log('App Hide')
} }
@ -61,6 +81,13 @@
@import 'static/iconfont/iconfont.css'; @import 'static/iconfont/iconfont.css';
@import 'static/css/guildford.css'; @import 'static/css/guildford.css';
@import 'static/css/style.scss'; @import 'static/css/style.scss';
/* 条件编译仅在H5平台生效 */
// #ifdef H5
body::-webkit-scrollbar,html::-webkit-scrollbar {
display: none;
}
// #endif
view{ view{
box-sizing: border-box; box-sizing: border-box;
} }

View File

@ -180,3 +180,11 @@ export function seckillCode(id,data) {
export function scombinationCode(id) { export function scombinationCode(id) {
return request.get("combination/code/"+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 * @param string cartId
*/ */
export function orderConfirm(cartId, isNew, addAgain) { export function orderConfirm(cartId, isNew, addAgain,secKill) {
return request.post('order/confirm', { return request.post('order/confirm', {
cartIds: cartId, cartIds: cartId,
isNew: isNew, isNew: isNew,
addAgain: addAgain addAgain: addAgain,
secKill: secKill
}, {}, 1); }, {}, 1);
} }

View File

@ -57,7 +57,7 @@ export function collectDel(id, category) {
* *
*/ */
export function postCartAdd(data) { 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); 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=>{ }).catch(res=>{
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title:res.msg, title:res.message,
icon:'none', icon:'none',
duration:2000 duration:2000
}); });

View File

@ -4,18 +4,18 @@
<view @click="goDetail(item)" class='item acea-row row-between-wrapper' hover-class="none"> <view @click="goDetail(item)" class='item acea-row row-between-wrapper' hover-class="none">
<view class='pictrue'> <view class='pictrue'>
<image :src='item.image'></image> <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.activityH5 && item.activityH5.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.activityH5 && item.activityH5.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 === '3'"></span>
</view> </view>
<view class='underline'> <view class='underline'>
<view class='text'> <view class='text'>
<view class='line1'>{{item.storeName}}</view> <view class='line1'>{{item.storeName}}</view>
<view class='money font-color'><text class='num'>{{item.price}}</text></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}} <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>
<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> </view>
<view class='iconfont icon-gouwuche cart-color acea-row row-center-wrapper'></view> <view class='iconfont icon-gouwuche cart-color acea-row row-center-wrapper'></view>

View File

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

View File

@ -12,11 +12,12 @@
<view class="money font-color"> <view class="money font-color">
<text class="num">{{ attr.productSelect.price }}</text> <text class="num">{{ attr.productSelect.price }}</text>
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</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> </view>
<view class="iconfont icon-guanbi" @click="closeAttr"></view> <view class="iconfont icon-guanbi" @click="closeAttr"></view>
</view> </view>
<view class="rollTop">
<view class="productWinList"> <view class="productWinList">
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw"> <view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
<view class="title">{{ item.attrName }}</view> <view class="title">{{ item.attrName }}</view>
@ -28,7 +29,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="cart"> <view class="cart acea-row row-between-wrapper">
<view class="title">数量</view> <view class="title">数量</view>
<view class="carnum acea-row row-left"> <view class="carnum acea-row row-left">
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes"> <view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
@ -45,13 +46,15 @@
@click="CartNumAdd"> @click="CartNumAdd">
+ +
</view> </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 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>
</view> </view>
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.product_stock>0 &&attr.productSelect.quota>0" @click="goCat"></view> </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 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>
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view> <view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
</view> </view>
@ -89,6 +92,9 @@
data() { data() {
return {}; return {};
}, },
mounted() {
console.log(this.attr)
},
methods: { methods: {
goCat:function(){ goCat:function(){
this.$emit('goCat'); this.$emit('goCat');
@ -210,8 +216,8 @@
color: #8a8a8a; color: #8a8a8a;
} }
.product-window .productWinList { .product-window .rollTop{
max-height: 395rpx; max-height: 500rpx;
overflow: auto; overflow: auto;
margin-top: 36rpx; margin-top: 36rpx;
} }
@ -231,18 +237,24 @@
} }
.product-window .productWinList .item .listn .itemn { .product-window .productWinList .item .listn .itemn {
border: 1px solid #bbb; border: 1px solid #F2F2F2;
font-size: 26rpx; font-size: 26rpx;
color: #282828; color: #282828;
padding: 7rpx 33rpx; padding: 7rpx 33rpx;
border-radius: 6rpx; border-radius: 25rpx;
margin: 14rpx 0 0 14rpx; margin: 20rpx 0 0 14rpx;
background-color: #F2F2F2;
} }
.product-window .productWinList .item .listn .itemn.on { .product-window .productWinList .item .listn .itemn.on {
color: #fff; color: #E93323;
background-color: #ff3700; background:rgba(255,244,243,1);
border-color: #ff3700; border-color: #E93323;
}
.product-window .productWinList .item .listn .itemn.limit {
color: #999;
text-decoration:line-through;
} }
.product-window .cart { .product-window .cart {
@ -261,12 +273,12 @@
} }
.product-window .cart .carnum view { .product-window .cart .carnum view {
border: 1px solid #a4a4a4; // border: 1px solid #a4a4a4;
width: 84rpx; width: 84rpx;
text-align: center; text-align: center;
height: 100%; height: 100%;
line-height: 54rpx; line-height: 54rpx;
color: #a4a4a4; color: #282828;
font-size: 45rpx; font-size: 45rpx;
} }
@ -277,8 +289,9 @@
} }
.product-window .cart .carnum .reduce.on { .product-window .cart .carnum .reduce.on {
border-color: #e3e3e3; // border-color: #e3e3e3;
color: #dedede; color: #DEDEDE;
font-size: 60rpx;
} }
.product-window .cart .carnum .plus { .product-window .cart .carnum .plus {
@ -293,6 +306,7 @@
} }
.product-window .cart .carnum .num { .product-window .cart .carnum .num {
background:rgba(242,242,242,1);
color: #282828; color: #282828;
font-size: 28rpx; 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='item acea-row row-between-wrapper' @tap="goDetail(item)" hover-class="none">
<view class='pictrue'> <view class='pictrue'>
<image :src='item.image'></image> <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.activityH5 && item.activityH5.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.activityH5 && item.activityH5.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 === '3'"></span>
</view> </view>
<view class='text'> <view class='text'>
<view class='name line1'>{{item.store_name}}</view> <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='item' v-for="(item,index) in hostProduct" :key="index" hover-class='none' @tap="goDetail(item)">
<view class='pictrue'> <view class='pictrue'>
<image :src='item.image'></image> <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.activityH5 && item.activityH5.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.activityH5 && item.activityH5.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 === '3'"></span>
</view> </view>
<view class='name line1'>{{item.storeName}}</view> <view class='name line1'>{{item.storeName}}</view>
<view class='money font-color'><text class='num'>{{item.price}}</text></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"> <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 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)"> <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 class="txt line1">{{item.name}}</view>
</view> </view>
</view> </view>

View File

@ -12,7 +12,7 @@
</view> </view>
<view class="time">{{ item.createTime }} {{ item.suk }}</view> <view class="time">{{ item.createTime }} {{ item.suk }}</view>
<view class="evaluate-infor">{{ item.comment }}</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"> <view class="pictrue" v-for="(itemn, indexn) in item.pics" :key="indexn">
<image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image> <image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image>
</view> </view>

View File

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

View File

@ -1,16 +1,16 @@
export function goShopDetail(item,uid) { export function goShopDetail(item,uid) {
return new Promise(resolve => { return new Promise(resolve => {
if (item.activity && item.activity.type === "1") { if (item.activityH5 && item.activityH5.type === "1") {
uni.navigateTo({ 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({ 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({ 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 { } else {
resolve(item); 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 * @param {Object} config

View File

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

View File

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

View File

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

View File

@ -2,9 +2,23 @@
<div> <div>
<view class='flash-sale'> <view class='flash-sale'>
<view class="saleBox"></view> <view class="saleBox"></view>
<view class='header' v-if="timeList.length>0"> <!-- banner -->
<image :src='timeList[active].slide'></image> <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>
<!-- <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="seckillList acea-row row-between-wrapper">
<view class="priceTag"> <view class="priceTag">
<image src="/static/images/priceTag.png"></image> <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;"> <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'> <block v-for="(item,index) in timeList" :key='index'>
<view @tap='settimeList(item,index)' class='item' :class="active == index?'on':''"> <view @tap='settimeList(item,index)' class='item' :class="active == index?'on':''">
<view class='time'>{{item.time}}</view> <view class='time'>{{item.time.split(',')[0]}}</view>
<view class="state">{{item.state}}</view> <view class="state">{{item.statusName}}</view>
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<view class='list'> <view class='list' v-if='seckillList.length>0'>
<block v-for="(item,index) in seckillList" :key='index'> <block v-for="(item,index) in seckillList" :key='index'>
<view class='item acea-row row-between-wrapper' @tap='goDetails(item)'> <view class='item acea-row row-between-wrapper' @tap='goDetails(item)'>
<view class='pictrue'> <view class='pictrue'>
@ -30,16 +44,16 @@
<view class='name line1'>{{item.title}}</view> <view class='name line1'>{{item.title}}</view>
<view class='money'> <view class='money'>
<text class='num font-color'>{{item.price}}</text> <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>
<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="progress">
<view class='bg-reds' :style="'width:'+item.percent+'%;'"></view> <view class='bg-reds' :style="'width:'+item.percent+'%;'"></view>
<view class='piece'>已抢{{item.percent}}%</view> <view class='piece'>已抢{{item.percent}}%</view>
</view> </view>
</view> </view>
<view class='grab bg-color' v-if="status == 1"></view> <view class='grab bg-color' v-if="status == 2"></view>
<view class='grab bg-color' v-else-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 class='grab bg-color-hui' v-else></view>
</view> </view>
</block> </block>
@ -56,7 +70,7 @@
<script> <script>
import { import {
getSeckillIndexTime, getSeckillHeaderApi,
getSeckillList getSeckillList
} from '../../../api/activity.js'; } from '../../../api/activity.js';
import home from '@/components/home/index.vue' import home from '@/components/home/index.vue'
@ -66,6 +80,10 @@
}, },
data() { data() {
return { return {
circular: true,
autoplay: true,
interval: 500,
// duration: 500,
topImage: '', topImage: '',
seckillList: [], seckillList: [],
timeList: [], timeList: [],
@ -81,6 +99,7 @@
loading: false, loading: false,
loadend: false, loadend: false,
pageloading: false, pageloading: false,
seckillHeader: [],
} }
}, },
onLoad() { onLoad() {
@ -89,8 +108,7 @@
methods: { methods: {
getSeckillConfig: function() { getSeckillConfig: function() {
let that = this; let that = this;
getSeckillIndexTime().then(res => { getSeckillHeaderApi().then(res => {
that.topImage = res.data.lovely;
that.timeList = res.data.seckillTime; that.timeList = res.data.seckillTime;
that.active = res.data.seckillTimeIndex; that.active = res.data.seckillTimeIndex;
if (that.timeList.length) { if (that.timeList.length) {
@ -116,7 +134,7 @@
if (that.pageloading) return; if (that.pageloading) return;
this.pageloading = true this.pageloading = true
getSeckillList(that.timeList[that.active].id, data).then(res => { getSeckillList(that.timeList[that.active].id, data).then(res => {
var seckillList = res.data; var seckillList = res.data.list;
var loadend = seckillList.length < that.limit; var loadend = seckillList.length < that.limit;
that.page++; that.page++;
that.seckillList = that.seckillList.concat(seckillList), that.seckillList = that.seckillList.concat(seckillList),
@ -147,7 +165,7 @@
}, },
goDetails(item){ goDetails(item){
uni.navigateTo({ 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; width: 180rpx;
height: 180rpx; height: 180rpx;
border-radius: 10rpx; border-radius: 10rpx;
background-color: #F5F5F5;
} }
.flash-sale .list .item .pictrue image { .flash-sale .list .item .pictrue image {

View File

@ -19,15 +19,10 @@
<view id="past0"> <view id="past0">
<productConSwiper :imgUrls='imgUrls'></productConSwiper> <productConSwiper :imgUrls='imgUrls'></productConSwiper>
<view class='nav acea-row row-between-wrapper'> <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='acea-row row-middle'>
<view class='time' v-if="status == 1"> <view class='time' v-if="status == 2">
<view>距秒杀结束仅剩</view> <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="' '" <countDown :is-day="false" :tip-text="' '" :day-text="' '" :hour-text="' : '" :minute-text="' : '" :second-text="' '"
:datatime="datatime"></countDown> :datatime="datatime"></countDown>
</view> </view>
@ -43,9 +38,8 @@
<view class='iconfont icon-fenxiang' @click="listenerActionSheet"></view> <view class='iconfont icon-fenxiang' @click="listenerActionSheet"></view>
</view> </view>
<view class='label acea-row row-middle'> <view class='label acea-row row-middle'>
<!-- <view class='stock'>库存{{storeInfo.stock}}{{storeInfo.unit_name}}</view> --> <view class='stock'>累计销售{{Number(storeInfo.sales) + Number(storeInfo.ficti) || 0}}{{storeInfo.unitName}}</view>
<view class='stock'>累计销售{{storeInfo.total?storeInfo.total:0}}</view> <view>限量: {{ storeInfo.quotaShow ? storeInfo.quotaShow : 0 }} {{storeInfo.unitName}}</view>
<view>限量: {{ storeInfo.quota ? storeInfo.quota : 0 }} </view>
</view> </view>
</view> </view>
<view class='attribute acea-row row-between-wrapper' @tap='selecAttr' v-if='attribute.productAttr.length'> <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='userEvaluation' id="past1">
<view class='title acea-row row-between-wrapper'> <view class='title acea-row row-between-wrapper'>
<view>用户评价({{replyCount}})</view> <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='font-color'>{{replyChance}}%</text>好评率
<text class='iconfont icon-jiantou'></text> <text class='iconfont icon-jiantou'></text>
</navigator> </navigator>
@ -67,7 +61,7 @@
<view class='title'>产品介绍</view> <view class='title'>产品介绍</view>
<view class='conter'> <view class='conter'>
<!-- <template is="wxParse" data="{{wxParseData:description.nodes}}" /> --> <!-- <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> </view>
<view style='height:120rpx;'></view> <view style='height:120rpx;'></view>
@ -90,19 +84,23 @@
<view class='iconfont icon-shoucang' v-else></view> <view class='iconfont icon-shoucang' v-else></view>
<view>收藏</view> <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="joinCart bnts" @tap="openAlone"></view>
<view class="buy bnts" @tap="goCat"></view> <view class="buy bnts" @tap="goCat"></view>
</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="joinCart bnts" @tap="openAlone"></view>
<view class="buy bnts bg-color-hui">已售罄</view> <view class="buy bnts bg-color-hui">已售罄</view>
</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="joinCart bnts" @tap="openAlone"></view>
<view class="buy bnts bg-color-hui">未开始</view> <view class="buy bnts bg-color-hui">未开始</view>
</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="joinCart bnts" @tap="openAlone"></view>
<view class="buy bnts bg-color-hui">已结束</view> <view class="buy bnts bg-color-hui">已结束</view>
</view> </view>
@ -133,10 +131,11 @@
<view class="">生成海报</view> <view class="">生成海报</view>
</button> </button>
</view> </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='/static/images/poster-close.png' class='close' @click="posterImageClose"></image>
<image :src='posterImage'></image> <image :src='posterImage'></image>
<!-- #ifndef H5 --> <!-- #ifndef H5 -->
@ -146,13 +145,19 @@
<view class="keep">长按图片可以保存到手机</view> <view class="keep">长按图片可以保存到手机</view>
<!-- #endif --> <!-- #endif -->
</view> </view>
<view class='mask' v-if="posterImageStatus"></view> <view class="canvas" v-else>
<canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas> <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> </view>
</template> </template>
<script> <script>
const app = getApp(); const app = getApp();
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
import { import {
mapGetters mapGetters
} from "vuex"; } from "vuex";
@ -163,13 +168,18 @@
import { import {
postCartAdd, postCartAdd,
collectAdd, collectAdd,
collectDel collectDel,
getReplyList,
getReplyConfig
} from '@/api/store.js'; } from '@/api/store.js';
import productConSwiper from '@/components/productConSwiper/index.vue' import productConSwiper from '@/components/productConSwiper/index.vue'
import productWindow from '@/components/productWindow/index.vue' import productWindow from '@/components/productWindow/index.vue'
import userEvaluation from '@/components/userEvaluation/index.vue' import userEvaluation from '@/components/userEvaluation/index.vue'
// #ifdef MP // #ifdef MP
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import {
getQrcode
} from '@/api/api.js';
// #endif // #endif
import parser from "@/components/jyf-parser/jyf-parser"; import parser from "@/components/jyf-parser/jyf-parser";
import home from '@/components/home/index.vue' import home from '@/components/home/index.vue'
@ -243,7 +253,14 @@
posterImage: '', // posterImage: '', //
posterbackgd: '/static/images/posterbackgd.png', posterbackgd: '/static/images/posterbackgd.png',
actionSheetHidden: false, actionSheetHidden: false,
cart_num:'' cart_num:'',
attrTxt: '',
qrcodeSize: 600,
productId: 0, //id
aloneAttrValueId: 0 ,//id
imagePath:'',//
imgTop:'',
buyNum: 1
} }
}, },
components: { components: {
@ -257,7 +274,7 @@
authorize authorize
// #endif // #endif
}, },
computed: mapGetters(['isLogin']), computed: mapGetters(['isLogin','uid']),
onLoad(options) { onLoad(options) {
let that = this let that = this
@ -280,7 +297,6 @@
// //
if (options.scene) { if (options.scene) {
let value = this.$util.getUrlParams(decodeURIComponent(options.scene)); let value = this.$util.getUrlParams(decodeURIComponent(options.scene));
console.log(value,'options')
if (value.id){ if (value.id){
this.id = value.id; this.id = value.id;
}else{ }else{
@ -302,8 +318,11 @@
this.datatime = Number(options.time) this.datatime = Number(options.time)
this.status = options.status this.status = options.status
} }
if(options.productId) this.productId = Number(options.productId)
if (this.isLogin) { if (this.isLogin) {
this.getSeckillDetail(); this.getSeckillDetail();
this.getProductReplyList();
this.getProductReplyCount();
} else { } else {
// #ifdef H5 || APP-PLUS // #ifdef H5 || APP-PLUS
toLogin(); toLogin();
@ -315,13 +334,34 @@
} }
}, },
methods: { 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) { 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); this.$set(this, "cart_num", e);
if (e > 1) {
return this.$util.Tips({
title: `该商品每次限购1${this.storeInfo.unitName}`
});
}
}, },
// 退 // 退
returns: function() { returns: function() {
@ -337,24 +377,26 @@
getSeckillDetail: function() { getSeckillDetail: function() {
let that = this; let that = this;
getSeckillDetail(that.id).then(res => { 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.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.attribute.productAttr = res.data.productAttr;
this.productValue = res.data.productValue; this.productValue = res.data.productValue;
this.personNum = res.data.storeInfo.num; this.personNum = res.data.storeInfo.quota;
this.replyCount = res.data.replyCount; this.attribute.productSelect.num = res.data.storeInfo.num;
this.reply = res.data.reply ? [res.data.reply] : [];
this.replyChance = res.data.replyChance
// #ifdef H5 // #ifdef H5
this.PromotionCode = res.data.storeInfo.code_base that.storeImage = that.storeInfo.image;
that.storeImage = that.storeInfo.image that.make();
that.getImageBase64(); that.getImageBase64(that.storeImage);
that.setShare(); that.setShare();
// #endif // #endif
// #ifdef MP
that.getQrcode();
// #endif
// #ifndef H5 // #ifndef H5
that.downloadFilestoreImage(); that.downloadFilestoreImage();
that.downloadFilePromotionCode(); //that.downloadFilePromotionCode();
// #endif // #endif
that.DefaultSelect(); that.DefaultSelect();
setTimeout(function() { setTimeout(function() {
@ -362,8 +404,7 @@
}, 500); }, 500);
app.globalData.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id + '&time=' + that.time + app.globalData.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id + '&time=' + that.time +
'&status=' + that.status + '&scene=' + that.storeInfo.uid; '&status=' + that.status + '&scene=' + that.storeInfo.uid;
// wxParse.wxParse('description', 'html', that.data.storeInfo.description || '', that, 0);
// wxh.time(that.data.time, that);
}).catch(err => { }).catch(err => {
that.$util.Tips({ that.$util.Tips({
title:err title:err
@ -385,7 +426,6 @@
link: location.href, link: location.href,
imgUrl: this.storeInfo.image imgUrl: this.storeInfo.image
}).then(res => { }).then(res => {
console.log(res);
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}); });
@ -398,9 +438,9 @@
let self = this let self = this
let productAttr = self.attribute.productAttr; let productAttr = self.attribute.productAttr;
let value = []; let value = [];
for (var key in this.productValue) { for (var key in self.productValue) {
if (this.productValue[key].quota > 0) { if (self.productValue[key].stock > 0) {
value = this.attribute.productAttr.length ? key.split(",") : []; value = self.attribute.productAttr.length ? key.split(",") : [];
break; break;
} }
} }
@ -408,34 +448,35 @@
this.$set(productAttr[i], "index", value[i]); this.$set(productAttr[i], "index", value[i]);
} }
//sort();:-- //sort();:--
let productSelect = this.productValue[value.sort().join(",")]; let productSelect = this.productValue[value.join(",")];
if (productSelect && productAttr.length) { if (productSelect && productAttr.length) {
self.$set( self.$set(
self.attribute.productSelect, self.attribute.productSelect,
"store_name", "storeName",
self.storeInfo.title self.storeInfo.storeName
); );
self.$set(self.attribute.productSelect, "image", productSelect.image); self.$set(self.attribute.productSelect, "image", productSelect.image);
self.$set(self.attribute.productSelect, "price", productSelect.price); self.$set(self.attribute.productSelect, "price", productSelect.price);
self.$set(self.attribute.productSelect, "stock", productSelect.stock); 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", productSelect.quota);
self.$set(self.attribute.productSelect, "quota_show", productSelect.quota_show); self.$set(self.attribute.productSelect, "quotaShow", productSelect.quotaShow);
self.$set(self.attribute.productSelect, "product_stock", productSelect.product_stock);
self.$set(self.attribute.productSelect, "cart_num", 1); self.$set(self.attribute.productSelect, "cart_num", 1);
self.$set(self, "attrValue", value.sort().join(",")); self.$set(self, "attrValue", value.join(","));
self.attrValue = value.sort().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) { } else if (!productSelect && productAttr.length) {
self.$set( self.$set(
self.attribute.productSelect, self.attribute.productSelect,
"store_name", "storeName",
self.storeInfo.title self.storeInfo.storeName
); );
self.$set(self.attribute.productSelect, "image", self.storeInfo.image); self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
self.$set(self.attribute.productSelect, "price", self.storeInfo.price); self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
self.$set(self.attribute.productSelect, "quota", 0); self.$set(self.attribute.productSelect, "quota", 0);
self.$set(self.attribute.productSelect, "quota_show", 0); self.$set(self.attribute.productSelect, "quota", 0);
self.$set(self.attribute.productSelect, "product_stock", 0);
self.$set(self.attribute.productSelect, "stock", 0); self.$set(self.attribute.productSelect, "stock", 0);
self.$set(self.attribute.productSelect, "unique", ""); self.$set(self.attribute.productSelect, "unique", "");
self.$set(self.attribute.productSelect, "cart_num", 0); self.$set(self.attribute.productSelect, "cart_num", 0);
@ -444,22 +485,20 @@
} else if (!productSelect && !productAttr.length) { } else if (!productSelect && !productAttr.length) {
self.$set( self.$set(
self.attribute.productSelect, self.attribute.productSelect,
"store_name", "storeName",
self.storeInfo.title self.storeInfo.storeName
); );
self.$set(self.attribute.productSelect, "image", self.storeInfo.image); self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
self.$set(self.attribute.productSelect, "price", self.storeInfo.price); 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, "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.$set(
self.attribute.productSelect, self.attribute.productSelect,
"unique", "unique",
self.storeInfo.unique || "" self.aloneAttrValueId || ""
); );
self.$set(self.attribute.productSelect, "cart_num", 1); 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, "attrValue", "");
self.$set(self, "attrTxt", "请选择"); self.$set(self, "attrTxt", "请选择");
} }
@ -489,23 +528,27 @@
//0 //0
if (productSelect === undefined) return; if (productSelect === undefined) return;
let stock = productSelect.stock || 0; let stock = productSelect.stock || 0;
let quotaShow = productSelect.quota_show || 0; let quota = productSelect.quota || 0;
let productStock = productSelect.product_stock || 0;
let num = this.attribute.productSelect; 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) { if (changeValue) {
num.cart_num ++; console.log(this.buyNum);
if(quotaShow >= productStock){ if (num.cart_num === 1) {
if (num.cart_num > productStock) { return this.$util.Tips({
this.$set(this.attribute.productSelect, "cart_num", productStock); title: `该商品每次限购1${this.storeInfo.unitName}`
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);
} }
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, "cart_num", num.cart_num);
this.$set(this.attribute.productSelect, "cart_num", num.cart_num); this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
@ -520,8 +563,52 @@
this.$set(this.attribute.productSelect, "cart_num", num.cart_num); 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) { 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, "image", productSelect.image);
this.$set(this.attribute.productSelect, "price", productSelect.price); this.$set(this.attribute.productSelect, "price", productSelect.price);
this.$set(this.attribute.productSelect, "stock", productSelect.stock); 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, "cart_num", 1);
this.$set(this.attribute.productSelect, "quota", productSelect.quota); 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.$set(this, "attrValue", res);
this.attrTxt = "已选择" this.attrTxt = "已选择"
} else { } else {
this.$set(this.attribute.productSelect, "image", this.storeInfo.image); this.$set(this.attribute.productSelect, "image", this.storeInfo.image);
@ -548,7 +634,7 @@
this.$set(this.attribute.productSelect, "unique", ""); this.$set(this.attribute.productSelect, "unique", "");
this.$set(this.attribute.productSelect, "cart_num", 0); this.$set(this.attribute.productSelect, "cart_num", 0);
this.$set(this.attribute.productSelect, "quota", 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.$set(this, "attrValue", "");
this.attrTxt = "已选择" this.attrTxt = "已选择"
@ -612,11 +698,11 @@
setCollect: function() { setCollect: function() {
var that = this; var that = this;
if (this.storeInfo.userCollect) { if (this.storeInfo.userCollect) {
collectDel(this.storeInfo.product_id).then(res => { collectDel(this.storeInfo.productId).then(res => {
that.storeInfo.userCollect = !that.storeInfo.userCollect that.storeInfo.userCollect = !that.storeInfo.userCollect
}) })
} else { } else {
collectAdd(this.storeInfo.product_id).then(res => { collectAdd(this.storeInfo.productId).then(res => {
that.storeInfo.userCollect = !that.storeInfo.userCollect that.storeInfo.userCollect = !that.storeInfo.userCollect
}) })
} }
@ -626,7 +712,7 @@
*/ */
openAlone: function() { openAlone: function() {
uni.navigateTo({ 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() { goCat: function() {
var that = this; var that = this;
var productSelect = this.productValue[this.attrValue]; 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) if (this.isOpen)
this.attribute.cartAttr = true this.attribute.cartAttr = true
@ -647,17 +739,17 @@
title: '请选择属性' title: '请选择属性'
}); });
postCartAdd({ postCartAdd({
productId: that.storeInfo.product_id, productId: that.storeInfo.productId,
secKillId: that.id, isNew: true,
bargainId: 0, seckillId: Number(that.id),
combinationId: 0, // bargainId: 0,
cartNum: that.cart_num, // combinationId: 0,
uniqueId: productSelect !== undefined ? productSelect.unique : '', cartNum: that.cart_num ? this.cart_num : this.attribute.productSelect.cart_num,
'new': 1 productAttrUnique: productSelect !== undefined ? productSelect.id : this.aloneAttrValueId,
}).then(res => { }).then(res => {
this.isOpen = false this.isOpen = false
uni.navigateTo({ 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 => { }).catch(err => {
return this.$util.Tips({ return this.$util.Tips({
@ -694,7 +786,7 @@
}, },
// //
posterImageClose: function() { posterImageClose: function() {
this.posterImageStatus = false this.canvasStatus = false
}, },
// //
setDomain: function(url) { setDomain: function(url) {
@ -746,14 +838,11 @@
that.$set(that, 'PromotionCode', ''); that.$set(that, 'PromotionCode', '');
}); });
}, },
getImageBase64: function() { getImageBase64:function(images){
let that = this; let that = this;
imageBase64(that.storeImage, that.PromotionCode) imageBase64({url:images}).then(res=>{
.then(res => { that.imgTop = res.data.code
that.storeImage = res.data.image;
that.PromotionCode = res.data.code;
}) })
.catch(() => {});
}, },
// //
goFriend: function() { goFriend: function() {
@ -765,57 +854,48 @@
goPoster: function() { goPoster: function() {
let that = this; let that = this;
that.posters = false; that.posters = false;
that.$set(that, 'canvasStatus', true); let arrImages = [that.posterbackgd, that.imgTop, that.PromotionCode];
let arr2 = [that.posterbackgd, that.storeImage, that.PromotionCode]; let storeName = that.storeInfo.storeName;
// #ifndef H5 let price = that.storeInfo.price;
if (that.isDown) return that.$util.Tips({ that.$util.PosterCanvas(arrImages, storeName, price, function(tempFilePath) {
title: '正在下载海报,请稍后再试!' that.posterImage = tempFilePath;
}); that.canvasStatus = true;
// #endif
uni.getImageInfo({
src: that.PromotionCode,
fail: function(res) {
return that.$util.Tips({
title: '小程序二维码需要发布正式版后才能获取到'
}); });
}, },
success() { //
if (arr2[2] == '') { getQrcode(){
// let that = this;
// #ifndef H5 let data = {
that.downloadFilePromotionCode(function(msgPromotionCode) { pid: that.uid,
arr2[2] = msgPromotionCode; id: that.id,
if (arr2[2] == '') path: '/pages/goods_seckill_details/index'
return that.$util.Tips({ }
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: '海报二维码生成失败!' 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);
});
} }
}, })
});
}, },
/* /*
@ -879,8 +959,8 @@
href + "&spread=" + res.data.uid; href + "&spread=" + res.data.uid;
let configAppMessage = { let configAppMessage = {
desc: data.store_info, desc: data.storeInfo,
title: data.store_name, title: data.storeName,
link: href, link: href,
imgUrl: data.image imgUrl: data.image
}; };
@ -892,7 +972,7 @@
} }
</script> </script>
<style> <style scoped lang="scss">
.generate-posters { .generate-posters {
width: 100%; width: 100%;
height: 170rpx; height: 170rpx;
@ -1146,8 +1226,9 @@
background: #bbbbbb !important; background: #bbbbbb !important;
} }
.canvas { .canvas {
width: 750px; position:fixed;
height: 1190px; z-index: -5;
opacity: 0;
} }
.poster-pop { .poster-pop {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -31,7 +31,7 @@
<view class='label acea-row row-between-wrapper'> <view class='label acea-row row-between-wrapper'>
<view>原价:{{storeInfo.otPrice}}</view> <view>原价:{{storeInfo.otPrice}}</view>
<view>库存:{{storeInfo.stock}}{{storeInfo.unitName}}</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>
<!-- <view class='coupon acea-row row-between-wrapper' v-if="storeInfo.give_integral > 0"> <!-- <view class='coupon acea-row row-between-wrapper' v-if="storeInfo.give_integral > 0">
<view class='hide line1 acea-row'> <view class='hide line1 acea-row'>
@ -46,10 +46,10 @@
</view> </view>
<view class='iconfont icon-jiantou'></view> <view class='iconfont icon-jiantou'></view>
</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"> <view class="line1 acea-row">
<text>&nbsp;&nbsp;&nbsp;</text> <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':''"> <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="iconfonts iconfont icon-pintuan"></text>
<text class="activity_title"> 参与秒杀</text> <text class="activity_title"> 参与秒杀</text>
@ -76,7 +76,7 @@
<view class='userEvaluation' id="past1"> <view class='userEvaluation' id="past1">
<view class='title acea-row row-between-wrapper'> <view class='title acea-row row-between-wrapper'>
<view>用户评价({{replyCount}})</view> <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='font-color'>{{replyChance}}%</text>好评率
<text class='iconfont icon-jiantou'></text> <text class='iconfont icon-jiantou'></text>
</navigator> </navigator>
@ -100,9 +100,9 @@
<view class="item" v-for="(val,indexn) in item.list" :key="indexn" @click="goDetail(val)"> <view class="item" v-for="(val,indexn) in item.list" :key="indexn" @click="goDetail(val)">
<view class="pictrue"> <view class="pictrue">
<image :src="val.image"></image> <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.activityH5 && val.activityH5.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.activityH5 && val.activityH5.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 === '3'"></span>
</view> </view>
<view class="name line1">{{val.storeName}}</view> <view class="name line1">{{val.storeName}}</view>
<view class="money font-color">¥{{val.price}}</view> <view class="money font-color">¥{{val.price}}</view>
@ -326,7 +326,7 @@
description: '', description: '',
navActive: 0, navActive: 0,
H5ShareBox: false, // H5ShareBox: false, //
activity: [], activityH5: [],
retunTop: true, // retunTop: true, //
navH: "", navH: "",
navList: [], navList: [],
@ -451,7 +451,7 @@
let item = e; let item = e;
if (item.type === "1") { if (item.type === "1") {
uni.navigateTo({ 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") { } else if (item.type === "2") {
uni.navigateTo({ uni.navigateTo({
@ -508,36 +508,36 @@
*去商品详情页 *去商品详情页
*/ */
goDetail(item) { goDetail(item) {
if(!item.activity){ if(!item.activityH5){
uni.redirectTo({ uni.redirectTo({
url: '/pages/goods_details/index?id=' + item.id url: '/pages/goods_details/index?id=' + item.id
}) })
return return
} }
if (item.activity.length == 0) { if (item.activityH5.length == 0) {
uni.redirectTo({ uni.redirectTo({
url: '/pages/goods_details/index?id=' + item.id url: '/pages/goods_details/index?id=' + item.id
}) })
return return
} }
// //
if (item.activity && item.activity.type == 2) { if (item.activityH5 && item.activityH5.type == 2) {
uni.redirectTo({ 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 return
} }
// //
if (item.activity && item.activity.type == 3) { if (item.activityH5 && item.activityH5.type == 3) {
uni.redirectTo({ 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 return
} }
// //
if (item.activity && item.activity.type == 1) { if (item.activityH5 && item.activityH5.type == 1) {
uni.redirectTo({ 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 return
} }
@ -668,10 +668,9 @@
that.$set(that.attr, 'productAttr', res.data.productAttr); that.$set(that.attr, 'productAttr', res.data.productAttr);
that.$set(that, 'productValue', res.data.productValue); that.$set(that, 'productValue', res.data.productValue);
that.$set(that.sharePacket, 'priceName', res.data.priceName); that.$set(that.sharePacket, 'priceName', res.data.priceName);
console.log(that.sharePacket)
that.$set(that, 'systemStore', res.data.system_store); that.$set(that, 'systemStore', res.data.system_store);
that.$set(that, 'good_list', goodArray); 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({ uni.setNavigationBarTitle({
title: storeInfo.storeName.substring(0, 7) + "..." title: storeInfo.storeName.substring(0, 7) + "..."
}) })
@ -783,6 +782,7 @@
DefaultSelect: function() { DefaultSelect: function() {
let productAttr = this.attr.productAttr; let productAttr = this.attr.productAttr;
let value = []; let value = [];
console.log(this.productValue)
for (let key in this.productValue) { for (let key in this.productValue) {
if (this.productValue[key].stock > 0) { if (this.productValue[key].stock > 0) {
value = this.attr.productAttr.length ? key.split(",") : []; value = this.attr.productAttr.length ? key.split(",") : [];
@ -994,7 +994,7 @@
.catch(res => { .catch(res => {
that.isOpen = false; that.isOpen = false;
return that.$util.Tips({ return that.$util.Tips({
title: res.msg title: res
}); });
}); });
}, },
@ -1117,6 +1117,7 @@
let that = this; let that = this;
let href = location.href; let href = location.href;
href = href.indexOf("?") === -1 ? href + "?spread=" + uid : href + "&spread=" + uid; href = href.indexOf("?") === -1 ? href + "?spread=" + uid : href + "&spread=" + uid;
console.log(href)
uQRCode.make({ uQRCode.make({
canvasId: 'qrcode', canvasId: 'qrcode',
text: href, 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="item" v-for="(val,indexn) in item.list" :key="indexn" @click="goDetail(val)">
<view class="pictrue"> <view class="pictrue">
<image :src="val.image"></image> <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.activityH5 && val.activityH5.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.activityH5 && val.activityH5.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 === '3'"></span>
</view> </view>
<view class="name line1">{{val.storeName}}</view> <view class="name line1">{{val.storeName}}</view>
<view class="money font-color">¥{{val.price}}</view> <view class="money font-color">¥{{val.price}}</view>
@ -948,7 +948,7 @@
.catch(res => { .catch(res => {
that.isOpen = false; that.isOpen = false;
return that.$util.Tips({ 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='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"'> <view class='pictrue' :class='is_switch==true?"":"on"'>
<image :src='item.image' :class='is_switch==true?"":"on"'></image> <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.activityH5 && item.activityH5.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.activityH5 && item.activityH5.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 === '3'"></span>
</view> </view>
<view class='text' :class='is_switch==true?"":"on"'> <view class='text' :class='is_switch==true?"":"on"'>
<view class='name line1'>{{item.storeName}}</view> <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}} <view class='vip-money' v-if="item.vip_price && item.vip_price > 0">{{item.vip_price}}
<image src='../../static/images/vip.png'></image> <image src='../../static/images/vip.png'></image>
</view> </view>
<view>已售{{item.sales}}{{item.unitName}}</view> <view>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}}</view>
</view> </view>
</view> </view>
</view> </view>

View File

@ -154,9 +154,9 @@
<view class="list-box animated" :class='tempArr.length > 0?"fadeIn on":""'> <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="item" v-for="(item,index) in tempArr" :key="index" @click="goDetail(item)">
<view class="pictrue"> <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.activityH5 && item.activityH5.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.activityH5 && item.activityH5.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 === '3'"></span>
<image :src="item.image" mode=""></image> <image :src="item.image" mode=""></image>
</view> </view>
<view class="text-info"> <view class="text-info">
@ -177,6 +177,40 @@
</view> </view>
</view> </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'"> <view class="productList" v-if="navIndex>0" :style="'margin-top:'+prodeuctTop+'px'">
<block v-if="sortProduct.length>0"> <block v-if="sortProduct.length>0">
@ -185,18 +219,18 @@
@click="godDetail(item)"> @click="godDetail(item)">
<view class='pictrue' :class='is_switch==true?"":"on"'> <view class='pictrue' :class='is_switch==true?"":"on"'>
<image :src='item.image' :class='is_switch==true?"":"on"'></image> <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.activityH5 && item.activityH5.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.activityH5 && item.activityH5.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 === '3'"></span>
</view> </view>
<view class='text' :class='is_switch==true?"":"on"'> <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='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 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> <image src='../../static/images/vip.png'></image>
</view> </view>
<view>已售{{item.sales}}</view> <view>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}</view>
</view> </view>
</view> </view>
</view> </view>
@ -231,6 +265,10 @@
getIndexData, getIndexData,
getCoupons getCoupons
} from '@/api/api.js'; } from '@/api/api.js';
import {
getSeckillHeaderApi,
getSeckillList
} from '@/api/activity.js';
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
import { import {
getTemlIds getTemlIds
@ -372,7 +410,8 @@
pageInfo: '', // pageInfo: '', //
site_name: '', //title site_name: '', //title
iSshowH: false, iSshowH: false,
configApi: {} // configApi: {} ,//
spikeList: [], //
} }
}, },
onLoad() { onLoad() {
@ -385,6 +424,7 @@
} catch {} } catch {}
} }
}); });
this.getSeckillIndexTime();
let self = this let self = this
// #ifdef MP // #ifdef MP
// //
@ -413,6 +453,30 @@
}) })
}, },
methods: { 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 // #ifdef MP
getTemlIds() { getTemlIds() {
for (var i in arrTemp) { for (var i in arrTemp) {
@ -698,7 +762,7 @@
}, },
// //
goDetail(item) { goDetail(item) {
if (item.activity && item.activity.type === "2" && !this.isLogin) { if (item.activityH5 && item.activityH5.type === "2" && !this.isLogin) {
// #ifdef H5 // #ifdef H5
uni.showModal({ uni.showModal({
title: '提示', title: '提示',

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@ -30,7 +30,7 @@
</view> </view>
<view class="num-wrapper"> <view class="num-wrapper">
<view class="num-item" @click="goMenuPage('/pages/users/user_money/index')"> <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 class="txt">余额</view>
</view> </view>
<view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')"> <view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">

View File

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

View File

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

View File

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

View File

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

View File

@ -27,11 +27,12 @@
</view> </view>
<view class='text line1'>{{child.nickname}}</view> <view class='text line1'>{{child.nickname}}</view>
</view> </view>
<view class='money' v-if="child.type == 'brokerage'"><text class='font-color'>{{child.number}}</text></view> <view class='money'>返佣<text class='font-color'>{{child.number}}</text></view>
<view class='money' v-else><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>
<view class='bottom'> <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><text class='name'>下单时间</text>{{child.time}}</view>
</view> </view>
</view> </view>

View File

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

View File

@ -51,6 +51,19 @@
<view class='name'>提现</view> <view class='name'>提现</view>
<view class='input'><input :placeholder='"最低提现金额"+minPrice' placeholder-class='placeholder' name="money" type='digit'></input></view> <view class='input'><input :placeholder='"最低提现金额"+minPrice' placeholder-class='placeholder' name="money" type='digit'></input></view>
</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'> <view class='tip'>
当前可提现金额: <text class="price">{{commission.commissionCount}},</text>冻结佣金{{commission.brokenCommission}} 当前可提现金额: <text class="price">{{commission.commissionCount}},</text>冻结佣金{{commission.brokenCommission}}
</view> </view>
@ -70,6 +83,19 @@
<view class='name'>提现</view> <view class='name'>提现</view>
<view class='input'><input :placeholder='"最低提现金额"+minPrice' placeholder-class='placeholder' name="money" type='digit'></input></view> <view class='input'><input :placeholder='"最低提现金额"+minPrice' placeholder-class='placeholder' name="money" type='digit'></input></view>
</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'> <view class='tip'>
当前可提现金额: <text class="price">{{commission.commissionCount}},</text>冻结佣金{{commission.brokenCommission}} 当前可提现金额: <text class="price">{{commission.commissionCount}},</text>冻结佣金{{commission.brokenCommission}}
</view> </view>
@ -132,7 +158,10 @@
isClone: false, isClone: false,
isAuto: false, // isAuto: false, //
isShowAuth: false, // isShowAuth: false, //
commission:{} commission:{},
qrcodeUrlW:"",
qrcodeUrlZ:"",
isCommitted: false //
}; };
}, },
computed: mapGetters(['isLogin']), computed: mapGetters(['isLogin']),
@ -140,7 +169,7 @@
if (this.isLogin) { if (this.isLogin) {
this.getUserInfo(); this.getUserInfo();
this.getUserExtractBank(); this.getUserExtractBank();
this.getBrokerageCommission(); //this.getBrokerageCommission();
} else { } else {
// #ifdef H5 || APP-PLUS // #ifdef H5 || APP-PLUS
toLogin(); toLogin();
@ -152,12 +181,37 @@
} }
}, },
methods: { 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() { onLoadFun: function() {
this.getUserInfo(); this.getUserInfo();
this.getUserExtractBank(); this.getUserExtractBank();
this.getBrokerageCommission(); // this.getBrokerageCommission();
}, },
getBrokerageCommission(){ getBrokerageCommission: function(){
brokerageCommission().then(res=>{ brokerageCommission().then(res=>{
this.commission = res.data; this.commission = res.data;
}) })
@ -205,19 +259,21 @@
title: "请选择银行" title: "请选择银行"
}); });
value.extractType = 'bank'; value.extractType = 'bank';
value.bankname = that.array[that.index]; value.bankName = that.array[that.index];
} else if (that.currentTab == 1) { // } else if (that.currentTab == 1) { //
value.extractType = 'weixin'; value.extractType = 'weixin';
if (value.name.length == 0) return this.$util.Tips({ if (value.name.length == 0) return this.$util.Tips({
title: '请填写微信号' title: '请填写微信号'
}); });
value.wechat = value.name; value.wechat = value.name;
value.qrcodeUrl = that.qrcodeUrlW;
} else if (that.currentTab == 2) { // } else if (that.currentTab == 2) { //
value.extractType = 'alipay'; value.extractType = 'alipay';
if (value.name.length == 0) return this.$util.Tips({ if (value.name.length == 0) return this.$util.Tips({
title: '请填写账号' title: '请填写账号'
}); });
value.alipayCode = value.name; value.alipayCode = value.name;
value.qrcodeUrl = that.qrcodeUrlZ;
} }
if (value.money.length == 0) return this.$util.Tips({ if (value.money.length == 0) return this.$util.Tips({
title: '请填写提现金额' title: '请填写提现金额'
@ -225,13 +281,17 @@
if (value.money < that.minPrice) return this.$util.Tips({ if (value.money < that.minPrice) return this.$util.Tips({
title: '提现金额不能低于' + that.minPrice title: '提现金额不能低于' + that.minPrice
}); });
if(this.isCommitted==false){
this.isCommitted=true;
extractCash(value).then(res => { extractCash(value).then(res => {
that.getUserInfo(); that.getUserInfo();
return this.$util.Tips({ return this.$util.Tips({
title: "提现成功", title: "提现成功",
icon: 'success' icon: 'success'
},{ tab: 2, url: '/pages/users/user_spread_user/index' }); },{ tab: 2, url: '/pages/users/user_spread_user/index' });
this.isCommitted=false;
}).catch(err => { }).catch(err => {
this.isCommitted=false;
return this.$util.Tips({ return this.$util.Tips({
title: err title: err
}); });
@ -239,6 +299,7 @@
} }
} }
} }
}
</script> </script>
<style lang="scss"> <style lang="scss">
@ -296,9 +357,10 @@
.cash-withdrawal .wrapper .list .item { .cash-withdrawal .wrapper .list .item {
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #eee;
height: 107rpx; min-height: 28rpx;
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
padding: 39rpx 0;
} }
.cash-withdrawal .wrapper .list .item .name { .cash-withdrawal .wrapper .list .item .name {
@ -313,6 +375,39 @@
color: #bbb; 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 { .cash-withdrawal .wrapper .list .tip {
font-size: 26rpx; font-size: 26rpx;
color: #999; color: #999;

View File

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

View File

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

View File

@ -11,7 +11,31 @@
<view class='iconfont icon-jinbi1'></view> <view class='iconfont icon-jinbi1'></view>
</view> </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"> <block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
<view class='list'> <view class='list'>
<view class='item'> <view class='item'>
@ -46,7 +70,9 @@
<script> <script>
import { import {
getCommissionInfo, getCommissionInfo,
getSpreadInfo getSpreadInfo,
getRecordApi,
getCountApi
} from '@/api/user.js'; } from '@/api/user.js';
import { import {
toLogin toLogin
@ -104,8 +130,8 @@
}); });
this.name = '提现总额'; this.name = '提现总额';
this.recordType = 4; this.recordType = 4;
this.getRecordList(); this.getList();
this.getRecordListCount(); this.getCount();
} else if (type == 2) { } else if (type == 2) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "佣金记录" title: "佣金记录"
@ -146,6 +172,35 @@
authColse: function(e) { authColse: function(e) {
this.isShowAuth = 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() { getRecordList: function() {
let that = this; let that = this;
let page = that.page; let page = that.page;

View File

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

View File

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

View File

@ -248,7 +248,7 @@
time: time time: time
}); });
self.$util.Tips({ self.$util.Tips({
title:res.msg, title:res,
icon:'success' icon:'success'
},{ },{
tab:3 tab:3
@ -259,7 +259,7 @@
.catch(res => { .catch(res => {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: res.msg, title: res,
icon: 'none', icon: 'none',
duration: 2000 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 { } else {
errorCallback && errorCallback(data); errorCallback && errorCallback(data);
that.Tips({ that.Tips({
title: data.msg title: data.message
}); });
} }
} }
@ -618,6 +618,23 @@ import {
} }
return status; 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;
} }
} }