4b83c618 by simon

默认提交

1 parent 82f3a7a6
......@@ -3,7 +3,7 @@
<view class="tit">{{productInfo.productName}}</view>
<view class="img-wrap">
<swiper class="swiper" indicator-color="rgba(0,0,0,.3)" indicator-active-color="rgba(255,255,255,1)" indicator-dots="{{true}}" autoplay="{{true}}" interval="{{5000}}" duration="{{500}}">
<block wx:for="{{productInfo.productImages}}" wx:key="{{index}}">
<block wx:for="{{productInfo.productImages}}" wx:key="index">
<swiper-item>
<image class="swiper-image" src="{{item}}" mode="aspectFill" />
</swiper-item>
......
......@@ -2,7 +2,7 @@ let ENV_CONFIG = require('./env/index');
const APPID = ''
/** ====每次发布版本记得修改此环境配置==== */
const ENV = 'Prod'; // Dev Prod
const ENV = 'Dev'; // Dev Prod
const NET_CONFIG = ENV_CONFIG[ENV];
const MOCKAPI = ENV_CONFIG.mockApi;
......
......@@ -52,6 +52,9 @@ module.exports = {
seckillSubmit: '/seckill/submit', // post 提交秒杀订单
seckillMine: '/seckill/order', // post 我的秒杀产品
// 提现
pointsWithDraw: '/points/withdraw',
areaQuery: 'https://api.k.wxpai.cn/bizproxy/kdapi/area', // post 区域查询
uploadFile: '/kdapi/file/upload' //上传图片通用接口
......
......@@ -6,7 +6,7 @@
<view class="content">
<!-- 地址 item -->
<view class="manage-wrap">
<view wx:for="{{receiverList}}" wx:key="{{index}}" class="cont-wrap form">
<view wx:for="{{receiverList}}" wx:key="index" class="cont-wrap form">
<view bindtap="onSetDefaultHandler" data-data="{{item}}" class="ebg"></view>
<view class="form-tit">
<view class="address-message">
......
......@@ -9,7 +9,7 @@
<!-- 产品图 -->
<view class="img-wrap">
<swiper class="swiper" indicator-color="rgba(0,0,0,.3)" indicator-active-color="rgba(255,255,255,1)" indicator-dots="{{true}}" autoplay="{{true}}" interval="{{5000}}" duration="{{500}}">
<block wx:for="{{productInfo.auctionImages}}" wx:key="{{index}}">
<block wx:for="{{productInfo.auctionImages}}" wx:key="index">
<swiper-item>
<image class="swiper-image" src="{{item}}" mode="aspectFit" />
</swiper-item>
......
......@@ -10,7 +10,7 @@
<view bindtap="onShowAuctionMineHandler" class="btn">我的竞价</view>
</view>
<view class="list">
<view bindtap="onDetailHandler" data-data="{{item}}" data-index="{{index}}" wx:for="{{dataList}}" wx:key="{{index}}" class="border list-item">
<view bindtap="onDetailHandler" data-data="{{item}}" data-index="{{index}}" wx:for="{{dataList}}" wx:key="index" class="border list-item">
<view class="prize">
<image class="image" mode="aspectFill" src="{{item.auctionImages && item.auctionImages[0] || ''}}" />
</view>
......
......@@ -7,7 +7,7 @@
<view class="top-space"></view>
<view class="content">
<view class="list">
<view wx:for="{{dataList}}" wx:key="{{index}}" class="border list-item">
<view wx:for="{{dataList}}" wx:key="index" class="border list-item">
<view class="prize">
<image class="image" mode="aspectFill" src="{{item.auctionImages && item.auctionImages[0] || ''}}" />
</view>
......
......@@ -19,7 +19,7 @@
<view class="upload">
<view class="tips">上传照片</view>
<view class="upload-file">
<view class="upload-file-item" wx:for="{{files}}" wx:key="{{index}}">
<view class="upload-file-item" wx:for="{{files}}" wx:key="index">
<image class="thumb" src="{{item.path}}" mode="aspectFill" />
<span class="iconfont iconclose1 remove" data-index="{{index}}" bindtap="remove"></span>
</view>
......
......@@ -58,7 +58,7 @@
</view>
<view class="content">
<view class="product">
<view class="product-item" wx:for="{{productList}}" wx:key="{{index}}">
<view class="product-item" wx:for="{{productList}}" wx:key="index">
<view class="image-wrap">
<image class="image" mode="aspectFit" src="{{item.commodityThumbnail}}" />
</view>
......
import {
getBindtapData,
getQueryByUrl
getQueryByUrl,
Fen2Yuan
} from '../../utils/util';
let app = getApp();
......@@ -8,6 +9,7 @@ Page({
data: {
authorizeVisible: false,
productDetailVisible: false,
signTipsCompVisible: false,
bannerList: [], // 轮播图列表
total: 0,
page: 1,
......@@ -219,6 +221,65 @@ Page({
},
/**
* 奖金详情
*/
onIntegralDetailHandler(evt) {
app.router.push({
path: "integralDetail"
})
},
/**
* 奖金兑换
*/
onCashExchangeHanler(evt) {
let _this = this;
// let {
// userInfo
// } = this.data;
// let memberPoints = userInfo.memberPoints || 0;
let minPoints = Fen2Yuan(500);
wx.showModal({
title: '提示',
content: `确认兑换所有奖金?\r\n(余额满${minPoints}元才能提现)`,
success(res) {
if (res.confirm) {
_this.queryPointsWithDraw();
} else {}
}
});
},
// 提现
queryPointsWithDraw() {
console.log("queryPointsWithDraw");
let _this = this;
app.post({
toast: false,
url: app.api.pointsWithDraw,
data: {}
}).then((result) => {
console.log("result:", result);
wx.showModal({
content: '兑换成功',
success(res) {}
})
}).catch((err) => {
if (err.code == 1002) {
_this.setData({
signTipsCompVisible: true,
})
} else {
wx.showToast({
title: res.errMsg || "您未达到兑换条件",
icon: 'none'
})
}
});
},
/**
* 请求产品
*/
queryProduct() {
......@@ -421,7 +482,6 @@ Page({
}
},
/**
* 绑定手输code
* @param {*} e
......@@ -436,6 +496,7 @@ Page({
this.setData({
authorizeVisible: false,
productDetailVisible: false,
signTipsCompVisible:false,
})
},
// 子组件事件
......@@ -460,6 +521,17 @@ Page({
this.hideMask();
break;
// 去验证
case "_evt_to_verify":
this.hideMask();
this.toVipLoginHandler();
break;
// 暂不验证
case "_evt_not_verify":
this.hideMask();
break;
default:
break;
}
......
......@@ -12,13 +12,13 @@
<view class="icon-t1">点击扫码</view>
</view>
<view class="data">
<view class="data-item">
<view class="data-item" bindtap="onCashExchangeHanler">
<view class="data-item-t1">
{{userInfo&&userInfo.memberPoints ? filter.Fen2Yuan(userInfo.memberPoints) + '元' : '-' }}
</view>
<view class="data-item-t2">我的奖金</view>
<view class="data-item-t2">奖金兑换</view>
</view>
<view class="data-item">
<view class="data-item" bindtap="onIntegralDetailHandler">
<view class="data-item-t1">{{userInfo ? userInfo.promotionNum + '人' : '-' }}</view>
<view class="data-item-t2">推广人数</view>
</view>
......@@ -63,7 +63,7 @@
<!-- 轮播 banner -->
<view class="banner">
<swiper class="swiper" indicator-color="rgba(0,0,0,.3)" indicator-active-color="rgba(255,255,255,1)" indicator-dots="{{true}}" autoplay="{{true}}" interval="{{5000}}" duration="{{500}}">
<block wx:for="{{bannerList}}" wx:key="{{index}}">
<block wx:for="{{bannerList}}" wx:key="index">
<swiper-item>
<image class="swiper-image" src="{{item}}" mode="aspectFill" />
</swiper-item>
......@@ -76,7 +76,7 @@
<view class="product-title">产品推荐{{codeStr}}</view>
<view class="product-list">
<!-- for循环 -->
<view bindtap="onProductItemHandler" data-data="{{item}}" wx:for="{{productList}}" wx:key="{{index}}" class="item">
<view bindtap="onProductItemHandler" data-data="{{item}}" wx:for="{{productList}}" wx:key="index" class="item">
<image class="image" mode="aspectFill" src="{{item.productImages[0]}}" />
<view class="desc">{{item.productInfo}}</view>
</view>
......@@ -91,3 +91,6 @@
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
<van-popup show="{{ signTipsCompVisible }}">
<sign-tips-comp bind:evtcomp="evtcomp"></sign-tips-comp>
</van-popup>
......
......@@ -61,6 +61,13 @@ Page({
pointsType: "exchange",
type: "exchangeNum",
},
{
t1: "",
t2: "提现奖金",
index: "6",
pointsType: "withdraw",
type: "withdrawNum",
},
],
},
onShareAppMessage() {},
......@@ -257,6 +264,11 @@ Page({
status = "exchange";
break;
// 提现
case "6":
status = "withdraw";
break;
default:
break;
}
......
......@@ -154,9 +154,11 @@ $contentWidth:690px;
flex-wrap: wrap;
.t1 {
font-size: 28px;
// font-size: 28px;
font-size: 22px;
width: 100%;
text-align: center;
font-weight: bold;
}
.t2 {
......
......@@ -26,7 +26,7 @@
</view>
<!-- 标签 -->
<view class="tag">
<view bindtap="onNavSelectHandler" data-data="{{item}}" data-index="{{index}}" wx:for="{{navList}}" wx:key="{{index}}" class="tag-item">
<view bindtap="onNavSelectHandler" data-data="{{item}}" data-index="{{index}}" wx:for="{{navList}}" wx:key="index" class="tag-item">
<image wx:if="{{navIndex==index}}" class="ebg" mode="aspectFit" src="../../image/icon/icon-integral-tag.png" />
<view class="desc {{navIndex == index ? 'act' : ''}}">
<view class="t1">{{index == 5 ? '-' : ''}}{{ index == 0 ? item.t1 : filter.Fen2Yuan(item.t1) }}</view>
......@@ -43,7 +43,7 @@
</view>
<!-- 奖金 -->
<view class="integral">
<view wx:for="{{dataList}}" wx:key="{{item}}" class="integral-item">
<view wx:for="{{dataList}}" wx:key="item" class="integral-item">
<view class="tt t1">{{item.time}}</view>
<view class="tt t2">{{item.words}}</view>
<view class="tt t3">{{item.subTitle}}</view>
......
......@@ -9,7 +9,7 @@
<view bindtap="deleteAll" class="func-item func-item2">删除已读消息</view>
</view>
<view class="news">
<view wx:for="{{dataList}}" wx:key="{{index}}" class="border news-item">
<view wx:for="{{dataList}}" wx:key="index" class="border news-item">
<view class="tit">
<view class="tit-item">
{{item.announcementTitle}}
......
......@@ -30,7 +30,7 @@
</view>
<!-- 卡片 -->
<view class="card">
<view wx:for="{{dataList}}" wx:key="{{index}}" class="border card-item">
<view wx:for="{{dataList}}" wx:key="index" class="border card-item">
<view class="no">订单编号:{{item.orderCode}}</view>
<view class="line"></view>
<view class="cont">
......
......@@ -5,7 +5,7 @@
<view class="top-space"></view>
<view class="content">
<view class="gift">
<view wx:for="{{dataList}}" wx:key="{{index}}" class="border gift-item">
<view wx:for="{{dataList}}" wx:key="index" class="border gift-item">
<view class="prize">
<image wx:if="{{item.prizeType == 'packet'}}" class="image" mode="aspectFit" src="../../image/icon/icon-gift-red-package.png" />
<image wx:else class="image" mode="aspectFit" src="../../image/icon/icon-gift-integral.png" />
......
......@@ -68,7 +68,7 @@
</view>
<!-- 排行item -->
<scroll-view bindscrolltolower="onRankScrolltolower" scroll-y="{{true}}" class="item-wrap">
<view wx:for="{{rankInfo.memberList}}" wx:key="{{index}}" class="rank-item {{item.rank == '1' ? 'rank-item-first':''}}">
<view wx:for="{{rankInfo.memberList}}" wx:key="index" class="rank-item {{item.rank == '1' ? 'rank-item-first':''}}">
<view class="no">
<image wx:if="{{item.rank == '1'}}" class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" />
<span wx:else>{{item.rank}}</span>
......
......@@ -9,7 +9,7 @@
<!-- 产品图 -->
<view class="img-wrap">
<swiper class="swiper" indicator-color="rgba(0,0,0,.3)" indicator-active-color="rgba(255,255,255,1)" indicator-dots="{{true}}" autoplay="{{true}}" interval="{{5000}}" duration="{{500}}">
<block wx:for="{{productInfo.seckillImages}}" wx:key="{{index}}">
<block wx:for="{{productInfo.seckillImages}}" wx:key="index">
<swiper-item>
<image class="swiper-image" src="{{item}}" mode="aspectFit" />
</swiper-item>
......
......@@ -10,7 +10,7 @@
<view bindtap="onShowSeckillMineHandler" class="btn">我的秒杀</view>
</view>
<view class="list">
<view bindtap="onDetailHandler" data-data="{{item}}" data-index="{{index}}" wx:for="{{dataList}}" wx:key="{{index}}" class="border list-item">
<view bindtap="onDetailHandler" data-data="{{item}}" data-index="{{index}}" wx:for="{{dataList}}" wx:key="index" class="border list-item">
<view class="prize">
<image class="image" mode="aspectFill" src="{{item.seckillImages && item.seckillImages[0] || ''}}" />
</view>
......
......@@ -7,7 +7,7 @@
<view class="top-space"></view>
<view class="content">
<view class="list">
<view wx:for="{{dataList}}" wx:key="{{index}}" class="border list-item">
<view wx:for="{{dataList}}" wx:key="index" class="border list-item">
<view class="prize">
<image class="image" mode="aspectFill" src="{{item.seckillImages && item.seckillImages[0] || ''}}" />
</view>
......
......@@ -25,7 +25,7 @@
</picker>
</view>
<view class="sign">
<view wx:for="{{dataList}}" wx:key="{{index}}" class="sign-item">
<view wx:for="{{dataList}}" wx:key="index" class="sign-item">
<view class="date">{{item.signTime}}</view>
<view class="desc">
签到成功,获得
......
......@@ -48,7 +48,7 @@
</view>
<!-- 7天签到 -->
<view class="check">
<view wx:for="{{signInfo}}" wx:key="{{index}}" class="check-item {{item ? 'check-item-act' :''}}">
<view wx:for="{{signInfo}}" wx:key="index" class="check-item {{item ? 'check-item-act' :''}}">
<view wx:if="{{index != 0}}" class="line"></view>
<view class="day">
<view class="circle">{{index+1}}</view>
......