作者 杨世雄

整合修改

正在显示 48 个修改的文件 包含 3702 行增加96 行删除

要显示太多修改。

为保证性能只显示 48 of 48+ 个文件。

... ... @@ -114,7 +114,16 @@
"pages/Vnew4Sstore/Vnew4Sstore",
"pages/carDetails/carDetails",
"pages/webview/webview",
"pages/deliveryservice/deliveryservice"
"pages/deliveryservice/deliveryservice",
"components/countdown/countdown",
"components/Draw/index_alert/index_alert",
"components/Draw/getPrize/getPrize",
"components/Draw/index_draw_alert/index_draw_alert",
"components/Draw/index_require_alert/index_require_alert",
"components/Draw/index_title/index_title",
"pages/myPrize/myPrize",
"pages/chooseList/chooseList"
],
"window": {
"backgroundTextStyle": "dark",
... ...
const {
strDiscode
} = require("../../../wxParse/wxDiscode");
import {
request
} from "../../../request/index.js";
// components/Draw/getPrize.js
const a = getApp()
Component({
/**
* 页面的初始数据
*/
data: {
imagesUrl: a.globalData.imagesUrl,
adviser: false,
// 收集信息
name: '',
phone: '',
code: '',
needAdviser: 0,
user_id: 0,
// 是否在验证中
codeFlag: true,
// 验证码文字
codeTxt: '发送验证码'
},
properties: {
brand: String,
brandId: Number,
brand2: String,
brandId2: Number,
drawid: Number
},
lifetimes: {
attached: function (options) {
console.log(this.data.drawid, '传递的抽奖id')
},
},
methods: {
//关闭收集信息
closePrize() {
let closePZ = false
this.triggerEvent('from_prize', closePZ);
},
// 品牌系选择
gochooseList(e) {
let listType = e.currentTarget.dataset.type
if (listType == 1) {
wx.navigateTo({
url: "/pages/chooseList/chooseList?listType=" + listType
})
} else if (!this.data.brand && !this.data.brandId) {
wx.showToast({
title: '请先选择您关注的品牌',
icon: 'none'
})
} else {
console.info('跳转选择车系')
wx.navigateTo({
url: "/pages/chooseList/chooseList?listType=" + listType + "&brandId=" + this.data.brandId
})
}
},
// 是否需要顾问?
needAdviser() {
this.setData({
adviser: !this.data.adviser
})
if (this.data.adviser == false) {
this.setData({
needAdviser: 0
})
} else {
this.setData({
needAdviser: 1
})
}
// console.log(this.data.needAdviser,'是否需要顾问')
},
//失焦获取手机
getblur(e) {
let phone = e.detail.value
console.log(e)
if (!phone) {
a.popTest('请输入手机号')
return
} else if (a.setPhone(phone) == false) {
a.popTest('手机号格式有误')
return
} else {
this.setData({
phone: phone
})
}
},
// 获取验证码
getCode() {
if (this.data.codeFlag == false) {
console.log('判定是否已发送')
a.popTest('请勿频繁操作')
return;
} else if (this.data.phone == '') {
console.log('验证手机')
console.log(this.data.phone)
a.popTest('请输入格式正确的手机号')
return
}
request({
url: 'api/h5/faCode',
data: {
phone: this.data.phone
}
}).then((res) => {
console.log(res)
if (res.code == 0) {
} else {
a.popTest(res.data.msg)
var time = 60
this.setData({
codeFlag: false,
codeTxt: "重新获取" + time,
})
var timer = setInterval(() => {
if (time == 1) {
this.setData({
codeTxt: "获取验证码",
codeFlag: true
})
clearInterval(timer)
} else {
time--
this.setData({
codeTxt: "重新获取" + time
})
}
}, 1000)
}
})
},
// 验证发送数据
getDetail: function (e) {
let phone = e.detail.value.userPho
let name = e.detail.value.userName
let code = e.detail.value.code
let det = e.detail.value
console.log(a.setPhone(phone))
if (!this.data.brand2) {
a.popTest('请选择您关注的车型')
return
} else if (!name) {
a.popTest('请输入姓名')
return
} else if (!phone) {
a.popTest('请输入手机号')
return
} else if (a.setPhone(phone) == false) {
a.popTest('手机号格式有误')
} else if (!code) {
a.popTest('请输入验证码')
return
} else if (code.length < 6) {
a.popTest('验证码格式有误')
return
} else {
console.log(e.detail.value, '判定成功')
// let data = {
// code: det.code,
// name: det.userName,
// mobile: det.userPho,
// user_id: this.data.user_id,
// id: this.data.drawid,
// pin2_id: this.data.brandId2,
// need_id: this.data.needAdviser
// }
// let {
// data
// } = request({
// url: 'api/h5/wsInfo',
// data: {
// code: det.code,
// name: det.userName,
// mobile: det.userPho,
// user_id: this.data.user_id,
// id: this.data.drawid,
// pin2_id: this.data.brandId2,
// need_id: this.data.needAdviser
// }
// })
try {
request({
url: 'api/h5/wsInfo',
data: {
code: det.code,
name: det.userName,
mobile: det.userPho,
user_id: this.data.user_id,
id: this.data.drawid,
pin2_id: this.data.brandId2,
need_id: this.data.needAdviser
}
})
.then((res) => {
console.log(res)
if (res.data.code == 1) {
a.popTest('数据已提交')
this.closePrize()
} else {
console.log('验证码错误')
a.popTest('验证码错误')
}
})
} catch (err) {
console.log(err, "出错了");
// a.popTest(err.msg)
}
}
}
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"component":true
}
\ No newline at end of file
... ...
.getPrize {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
.p-inner {
width: 80%;
height: 904rpx;
opacity: 1;
background: #7676b2;
border: 8rpx solid #383481;
border-radius: 40rpx;
padding: 48rpx 32rpx 32rpx 32rpx;
box-sizing: border-box;
.form {
.inp {
color: white;
font-size: 26rpx;
}
.inner_text {
font-size: 32rpx;
font-weight: 500;
color: #ffffff;
text-align: center;
margin-bottom: 50rpx;
display: block;
}
.sure {
font-size: 22rpx;
text-align: left;
color: #ffffff;
display: flex;
align-items: center;
view:nth-of-type(1) {
width: 30rpx;
height: 30rpx;
opacity: 1;
background: #ffffff;
border: 2rpx solid #383481;
margin-right: 20rpx;
}
text:nth-of-type(1) {
font-size: 22rpx;
font-weight: 400;
color: #ffffff;
}
}
.btn {
width: 82%;
height: 68rpx;
background-image: url(https://car.goorcar.com/assets/draw3/zixun_btn.png);
background-repeat: no-repeat;
background-size: contain;
font-size: 24rpx;
color: #ffffff;
text-shadow: 0rpx 8rpx 8rpx 0rpx rgba(188, 76, 20, 0.65);
text-align: center;
margin-top: 40rpx;
border-radius: 50rpx;
}
// 批量样式
.b {
width: 100%;
height: 76rpx;
background: #383481;
border-radius: 8rpx;
display: flex;
align-items: center;
position: relative;
padding: 0 20rpx;
box-sizing: border-box;
margin-bottom: 40rpx;
input:nth-of-type(1) {
width: 50%;
}
}
.i {
width: 32rpx;
height: 32rpx;
margin-right: 16rpx;
}
.pc {
font-size: 24rpx;
font-weight: 400;
color: rgba(255, 255, 255, 0.50);
}
.arrow {
width: 24rpx;
height: 24rpx;
position: absolute;
right: 16rpx;
}
.getcode {
font-size: 24rpx;
font-weight: 400;
text-decoration: underline;
color: #ffffff;
position: absolute;
right: 16rpx;
}
.ad {
background: #FECC80 !important;
}
.v {
width: 100%;
height: 100%;
}
.brand {
color: white;
font-size: 25rpx;
}
}
}
.p-close {
width: 48rpx;
height: 48rpx;
position: absolute;
bottom: 50rpx;
}
}
\ No newline at end of file
... ...
<view class="getPrize">
<view class="p-inner">
<form bindsubmit="getDetail" class="form">
<text class="inner_text ">填写获奖人信息</text>
<view class="name b">
<image src="{{imagesUrl}}assets/draw3/xingming_icon@2x.png" class="i"></image>
<input type="text" placeholder="请输入您的姓名" placeholder-class="pc" class="inp" value="" name="userName" />
</view>
<view class="phone b">
<image src="{{imagesUrl}}assets/draw3/dianhua_icon@2x.png" class="i"></image>
<input type="text" placeholder="请输入您的电话" placeholder-class="pc" class="inp" value="" name="userPho" bindblur="getblur"/>
</view>
<view class="code b">
<image src="{{imagesUrl}}assets/draw3/yanzhengma_icon@2x.png" class="i"></image>
<input type="text" placeholder="请输入您的验证码" placeholder-class="pc" class="inp" value="" name="code" />
<text class="getcode" bindtap="getCode">{{codeTxt}}</text>
</view>
<view class="brand b" bindtap="gochooseList" data-type="1">
<image src="{{imagesUrl}}assets/draw3/pinpai_icon@2x.png" class="i"></image>
<view class="pc {{brand?'brand':''}}">{{brand?brand:'请选择您关注的品牌'}}
</view>
<image class="arrow" src="{{imagesUrl}}assets/draw3/xuanze_icon@2x.png">
</image>
</view>
<view class="car b " bindtap="gochooseList" data-type="2">
<image src="{{imagesUrl}}assets/draw3/chexi_icon@2x.png" class="i"></image>
<view class="pc {{brand2?'brand':''}}">{{brand2?brand2:'请选择您关注的车系'}}</view>
<image class="arrow" src="{{imagesUrl}}assets/draw3/xuanze_icon@2x.png">
</image>
</view>
<!-- <view class="carType b">
<image src="{{imagesUrl}}assets/draw3/chexing_icon@2x.png" class="i"></image>
<input type="text" placeholder="请输入您关注的车型" placeholder-class="pc" />
<image class="arrow" src="{{imagesUrl}}assets/draw3/xuanze_icon@2x.png"></image>
</view> -->
<view class="sure">
<view class="select {{adviser == true?'ad':''}}" bindtap="needAdviser"></view>
<text>请确认是否需要专属顾问与您联系</text>
</view>
<button class="btn" form-type="submit">
立即获取
</button>
</form>
</view>
<image src="../../../static/img/close.png" class="p-close" bindtap="closePrize"></image>
</view>
\ No newline at end of file
... ...
.getPrize {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
}
.getPrize .p-inner {
width: 80%;
height: 904rpx;
opacity: 1;
background: #7676b2;
border: 8rpx solid #383481;
border-radius: 40rpx;
padding: 48rpx 32rpx 32rpx 32rpx;
box-sizing: border-box;
}
.getPrize .p-inner .form .inp {
color: white;
font-size: 26rpx;
}
.getPrize .p-inner .form .inner_text {
font-size: 32rpx;
font-weight: 500;
color: #ffffff;
text-align: center;
margin-bottom: 50rpx;
display: block;
}
.getPrize .p-inner .form .sure {
font-size: 22rpx;
text-align: left;
color: #ffffff;
display: flex;
align-items: center;
}
.getPrize .p-inner .form .sure view:nth-of-type(1) {
width: 30rpx;
height: 30rpx;
opacity: 1;
background: #ffffff;
border: 2rpx solid #383481;
margin-right: 20rpx;
}
.getPrize .p-inner .form .sure text:nth-of-type(1) {
font-size: 22rpx;
font-weight: 400;
color: #ffffff;
}
.getPrize .p-inner .form .btn {
width: 82%;
height: 68rpx;
background-image: url(https://car.goorcar.com/assets/draw3/zixun_btn.png);
background-repeat: no-repeat;
background-size: contain;
font-size: 24rpx;
color: #ffffff;
text-shadow: 0rpx 8rpx 8rpx 0rpx rgba(188, 76, 20, 0.65);
text-align: center;
margin-top: 40rpx;
border-radius: 50rpx;
}
.getPrize .p-inner .form .b {
width: 100%;
height: 76rpx;
background: #383481;
border-radius: 8rpx;
display: flex;
align-items: center;
position: relative;
padding: 0 20rpx;
box-sizing: border-box;
margin-bottom: 40rpx;
}
.getPrize .p-inner .form .b input:nth-of-type(1) {
width: 50%;
}
.getPrize .p-inner .form .i {
width: 32rpx;
height: 32rpx;
margin-right: 16rpx;
}
.getPrize .p-inner .form .pc {
font-size: 24rpx;
font-weight: 400;
color: rgba(255, 255, 255, 0.5);
}
.getPrize .p-inner .form .arrow {
width: 24rpx;
height: 24rpx;
position: absolute;
right: 16rpx;
}
.getPrize .p-inner .form .getcode {
font-size: 24rpx;
font-weight: 400;
text-decoration: underline;
color: #ffffff;
position: absolute;
right: 16rpx;
}
.getPrize .p-inner .form .ad {
background: #FECC80 !important;
}
.getPrize .p-inner .form .v {
width: 100%;
height: 100%;
}
.getPrize .p-inner .form .brand {
color: white;
font-size: 25rpx;
}
.getPrize .p-close {
width: 48rpx;
height: 48rpx;
position: absolute;
bottom: 50rpx;
}
... ...
// components/Draw/index_alert/index_alert.js
Page({
/**
* 页面的初始数据
*/
data: {
},
properties:{
alertInfo:{
type:Object
}
},
choseDrawAlert(){
this.$emit('choseDrawAlert')
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
.drawAlertWrap {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
.drawAlert {
width: 280rpx;
height: 494rpx;
background: #6b6aa8;
border: 8rpx solid #322d74;
border-radius: 40rpx;
padding: 0 112rpx;
.alertImg {
height: 268rpx;
display: flex;
justify-content: center;
align-items: center;
.alertImg image:nth-of-type(1) {
width: 268rpx;
height: 268rpx;
}
}
.drawTxtItem {
font-size: 28rpx;
font-weight: 600;
text-align: center;
color: #fff;
text:nth-of-type(1) {
color: #fcd87e;
}
}
.drawBtn {
width: 144rpx;
height: 48rpx;
background: linear-gradient(113deg, #fed96c 0%, #ff9060 100%);
border-radius: 24rpx;
color: #fff;
text-align: center;
line-height: 48rpx;
font-size: 24rpx;
font-weight: 600;
margin: 0 auto;
}
}
}
\ No newline at end of file
... ...
<template>
<view class="drawAlertWrap">
<view class="drawAlert">
<view class="alertImg">
<image :src="alertInfo.imgUrl" mode=""></image>
</view>
<view class="drawTxtItem">
{{alertInfo.alertTxt}}
</view>
<view class="drawTxtItem" v-if="alertInfo.otherTxt != ''">
{{alertInfo.otherTxt}}
</view>
<view class="drawTxtItem" v-if="alertInfo.share_num > 0" style="padding-top: 8rpx;">
可再获得<text>{{alertInfo.share_num}}次</text>抽奖机会
</view>
<view class="drawBtn" bindtap="choseDrawAlert" :style="{'margin-top':alertInfo.btnMt+'rpx'}">
{{alertInfo.btnTxt}}
</view>
</view>
</view>
</template>
\ No newline at end of file
... ...
.drawAlertWrap {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
}
.drawAlertWrap .drawAlert {
width: 280rpx;
height: 494rpx;
background: #6b6aa8;
border: 8rpx solid #322d74;
border-radius: 40rpx;
padding: 0 112rpx;
}
.drawAlertWrap .drawAlert .alertImg {
height: 268rpx;
display: flex;
justify-content: center;
align-items: center;
}
.drawAlertWrap .drawAlert .alertImg .alertImg image:nth-of-type(1) {
width: 268rpx;
height: 268rpx;
}
.drawAlertWrap .drawAlert .drawTxtItem {
font-size: 28rpx;
font-weight: 600;
text-align: center;
color: #fff;
}
.drawAlertWrap .drawAlert .drawTxtItem text:nth-of-type(1) {
color: #fcd87e;
}
.drawAlertWrap .drawAlert .drawBtn {
width: 144rpx;
height: 48rpx;
background: linear-gradient(113deg, #fed96c 0%, #ff9060 100%);
border-radius: 24rpx;
color: #fff;
text-align: center;
line-height: 48rpx;
font-size: 24rpx;
font-weight: 600;
margin: 0 auto;
}
... ...
// components/Draw/index_draw_alert/index_draw_alert.js
import {
request
} from "../../../request/index.js";
Component({
/**
* 页面的初始数据
*/
data: {
},
properties: {
// 奖品名和id
getchouName: {
type: String
},
getchouLogid: {
type: Number
},
drawid:{
type:Number
}
},
methods: {
// 关闭弹窗
closeDrawAlert() {
let closeDA = false
this.triggerEvent('from_draw_alert', closeDA);
console.log('13123', closeDA)
},
// 领奖
receive() {
console.log(this.data.getchouLogid)
request({
url: 'api/h5/lingJiang',
methods:'get',
data: {
log_id: this.data.getchouLogid,
}
})
this.closeDrawAlert()
wx.navigateTo({
url: '/pages/myPrize/myPrize?drawid='+this.data.drawid + '&type=' + 1,
})
}
},
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"component": true
}
\ No newline at end of file
... ...
.draw_alert_box {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
.draw_alert {
width: 500rpx;
height: 700rpx;
background-image: url(https://car.goorcar.com/assets/draw3/zu10458@2x.png);
background-size: contain;
margin: 0 auto;
position: fixed;
top: 26%;
left: 50%;
transform: translateX(-250rpx);
.draw_alert_del {
width: 48rpx;
height: 48rpx;
position: absolute;
top: 650rpx;
left: 50%;
transform: translateX(-24rpx);
}
.checkgift {
background-image: url(https://car.goorcar.com/assets/draw3/zixun_btn@2x.png);
height: 53rpx;
line-height: 53rpx;
text-align: center;
width: 320rpx;
font-size: 24rpx;
font-weight: 500;
color: #251a1a;
text-shadow: 0rpx 8rpx 8rpx 0rpx rgba(188, 76, 20, 0.65);
background-size: contain;
background-repeat: no-repeat;
position: absolute;
bottom: 100rpx;
left: 50%;
transform: translateX(-160rpx);
}
.draw_alert_text {
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
position: absolute;
top: 250rpx;
left: 85rpx;
}
}
}
\ No newline at end of file
... ...
<view class="draw_alert_box">
<view class="draw_alert">
<text class="draw_alert_text">恭喜您,抽中{{getchouName}}</text>
<view class="checkgift" bindtap="receive">去领奖</view>
<image src="../../../static/img/close.png" class="draw_alert_del" bindtap="closeDrawAlert"></image>
</view>
</view>
\ No newline at end of file
... ...
.draw_alert_box {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
}
.draw_alert_box .draw_alert {
width: 500rpx;
height: 700rpx;
background-image: url(https://car.goorcar.com/assets/draw3/zu10458@2x.png);
background-size: contain;
margin: 0 auto;
position: fixed;
top: 26%;
left: 50%;
transform: translateX(-250rpx);
}
.draw_alert_box .draw_alert .draw_alert_del {
width: 48rpx;
height: 48rpx;
position: absolute;
top: 650rpx;
left: 50%;
transform: translateX(-24rpx);
}
.draw_alert_box .draw_alert .checkgift {
background-image: url(https://car.goorcar.com/assets/draw3/zixun_btn@2x.png);
height: 53rpx;
line-height: 53rpx;
text-align: center;
width: 320rpx;
font-size: 24rpx;
font-weight: 500;
color: #251a1a;
text-shadow: 0rpx 8rpx 8rpx 0rpx rgba(188, 76, 20, 0.65);
background-size: contain;
background-repeat: no-repeat;
position: absolute;
bottom: 100rpx;
left: 50%;
transform: translateX(-160rpx);
}
.draw_alert_box .draw_alert .draw_alert_text {
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
position: absolute;
top: 250rpx;
left: 85rpx;
}
... ...
// components/Draw/index_require_alert/index_require_alert.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/Draw/index_require_alert/index_require_alert.wxml-->
<text>components/Draw/index_require_alert/index_require_alert.wxml</text>
... ...
/* components/Draw/index_require_alert/index_require_alert.wxss */
\ No newline at end of file
... ...
// components/Draw/index_title/index_title.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/Draw/index_title/index_title.wxml-->
<text>components/Draw/index_title/index_title.wxml</text>
... ...
/* components/Draw/index_title/index_title.wxss */
\ No newline at end of file
... ...
// components/countdown/countdown.js
Component({
/**
* 页面的初始数据
*/
data: {
day: "00",
day_one: "0",
day_two: "0",
hour: "00",
hour_one: "0",
hour_two: "0",
minute: "00",
minute_one: "0",
minute_two: "0",
second: "00",
second_one: "0",
second_two: "0",
},
properties: {
justifyLeft: {
type: String,
value: ""
},
//距离开始提示文字
tipText: {
type: String,
value: "倒计时"
},
dayText: {
type: String,
value: "天"
},
hourText: {
type: String,
value: "时"
},
minuteText: {
type: String,
value: "分"
},
secondText: {
type: String,
value: "秒"
},
datatime: {
type: Number,
value: 0
},
isDay: {
type: Boolean,
value: true
}
},
created: function () {
this.show_time();
},
methods: {
show_time: function () {
let that = this;
function runTime() {
//时间函数
let intDiff = that.data.datatime - Date.parse(new Date()) / 1000; //获取数据中的时间戳的时间差;
// console.log(that.data.datatime + '结束时间', intDiff + '时间差', Date.parse(new Date()) + '当前时间')
let day = 0,
hour = 0,
minute = 0,
second = 0;
if (intDiff > 0) {
// console.log('时间差大于0')
//转换时间
if (that.data.isDay === true) {
// console.log('时间转换开始')
day = Math.floor(intDiff / (60 * 60 * 24));
} else {
day = 0;
}
// console.log(day + '格式化后的天数')
hour = Math.floor(intDiff / (60 * 60)) - day * 24;
// console.log(hour + '格式化后的小时')
minute = Math.floor(intDiff / 60) - day * 24 * 60 - hour * 60;
// console.log(minute + '格式化后的分钟')
second =
Math.floor(intDiff) -
day * 24 * 60 * 60 -
hour * 60 * 60 -
minute * 60;
// console.log(second + '格式化后的秒')
if (day <= 9) day = "0" + day;
if (hour <= 9) hour = "0" + hour;
if (minute <= 9) minute = "0" + minute;
if (second <= 9) second = "0" + second;
// console.log('格式化完成' + day + '天' + hour + '小时' + minute + '分' + second + '秒')
that.setData({
day: day,
day_one: day.toString().substr(0, 1),
day_two: day.toString().substr(1, 2),
hour: hour,
hour_one: hour.toString().substr(0, 1),
hour_two: hour.toString().substr(1, 2),
minute: minute,
minute_one: minute.toString().substr(0, 1),
minute_two: minute.toString().substr(1, 2),
second: second,
second_one: second.toString().substr(0, 1),
second_two: second.toString().substr(1, 2)
})
} else {
that.setData({
day: '00',
day_one: '0',
day_two: '0',
hour: '00',
hour_one: '0',
hour_two: '0',
minute: '00',
minute_one: '0',
minute_two: '0',
second: '00',
second_one: '0',
second_two: '0'
})
}
}
runTime();
setInterval(runTime, 1000);
}
}
})
\ No newline at end of file
... ...
{
"component":true,
"usingComponents": {}
}
\ No newline at end of file
... ...
.endTime {
height: 102rpx;
display: flex;
font-size: 28rpx;
color: #fea145;
font-weight: 600;
.timeItem {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
}
.timeItem.left {
justify-content: flex-start;
}
.timeItem .timeBg {
width: 36rpx;
height: 40rpx;
background: #675b8d;
border-radius: 8rpx;
color: #fff;
text-align: center;
line-height: 40rpx;
margin-right: 5rpx;
}
\ No newline at end of file
... ...
<template></template>
<view class="endTime">
<view class="timeItem left">
距结束:
</view>
<view class="timeItem">
<view class="timeBg">{{day_one}}</view>
<view class="timeBg">{{day_two == '' ? '0' : day_two}}</view>
</view>
<view class="timeItem">
<view class="timeBg">{{hour_one}}</view>
<view class="timeBg">{{hour_two == '' ? '0' : hour_two}}</view>
</view>
<view class="timeItem">
<view class="timeBg">{{minute_one}}</view>
<view class="timeBg">{{minute_two == '' ? '0' : minute_two}}</view>
</view>
<view class="timeItem">
<view class="timeBg">{{second_one}}</view>
<view class="timeBg">{{second_two == '' ? '0' : second_two}}</view>
</view>
</view>
\ No newline at end of file
... ...
.endTime {
height: 102rpx;
display: flex;
font-size: 28rpx;
color: #fea145;
font-weight: 600;
}
.endTime .timeItem {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
.timeItem.left {
justify-content: flex-start;
}
.timeItem .timeBg {
width: 36rpx;
height: 40rpx;
background: #675b8d;
border-radius: 8rpx;
color: #fff;
text-align: center;
line-height: 40rpx;
margin-right: 5rpx;
}
... ...
{
"compilerOptions": {
"target": "es2015",
"module": "commonjs"
}
}
\ No newline at end of file
... ...
... ... @@ -33,6 +33,18 @@ Page({
list_id: '', // 优惠券id
use_fen_id: '',
no: '',
// 配送改
pei:[
{
name:'快递配送',
id:1
},
{
name:'自提',
id:2
},
],
pei_type:1
},
onLoad: function (options) {
... ... @@ -59,6 +71,13 @@ Page({
that.getConfirmAnOrder()
},
onShow: function () {},
// 配送改
choosePeiType(e){
this.setData({
pei_type:e.currentTarget.dataset.type
})
console.log(this.data.pei_type)
},
goRedPacketd(e) {
let order_no = e.currentTarget.dataset.order_no
wx.navigateTo({
... ... @@ -116,7 +135,8 @@ Page({
type: that.data.type,
bei: that.data.bei,
address_id: that.data.address.id,
list_id: that.data.list_id
list_id: that.data.list_id,
pei_type:that.data.pei_type
}
if (obj.address_id) {
if (that.data.all_pay != 0) {
... ...
<view class="container">
<view class="address" wx:if="{{address_id}}">
<view class="city">{{address.address}}</view>
<view class="addressDetails">{{address.address2}}</view>
<view class="person_">
<view class="person_ziliao">
<text class="person_name persongeren">{{address.name}}</text>
<text class="person_phone persongeren">{{address.phone}}</text>
<block wx:if="{{pei_type == 1}}">
<view class="address" wx:if="{{address_id}}">
<view class="city">{{address.address}}</view>
<view class="addressDetails">{{address.address2}}</view>
<view class="person_">
<view class="person_ziliao">
<text class="person_name persongeren">{{address.name}}</text>
<text class="person_phone persongeren">{{address.phone}}</text>
</view>
<view class="arrow_r" bindtap="changeReceiverAddress">
<image src="{{imagesUrl}}assets/static/img/right_arrow.png" />
</view>
</view>
<view class="arrow_r" bindtap="changeReceiverAddress">
</view>
<view class="addressde" bindtap="changeReceiverAddress" wx:else>
<view class="cdddd">+请添加收货地址</view>
<view class="arrow_r">
<image src="{{imagesUrl}}assets/static/img/right_arrow.png" />
</view>
</view>
</view>
<view class="addressde" bindtap="changeReceiverAddress" wx:else>
<view class="cdddd">+请添加收货地址</view>
<view class="arrow_r">
<image src="{{imagesUrl}}assets/static/img/right_arrow.png" />
</view>
</view>
</block>
<view class="zhuang">
<image src="{{imagesUrl}}assets/static/img/zhuangshi_img@2x.png" />
</view>
... ... @@ -42,7 +44,13 @@
<!-- 配送 -->
<view class="distribution public">
<text class="service public_1">配送服务</text>
<text class="service_right public_2">{{service}}</text>
<!-- <text class="service_right public_2">{{service}}</text> -->
<!-- 配送改 -->
<view class="dis-express" wx:for="{{pei}}" wx:key="index" bindtap="choosePeiType" data-type="{{item.id}}">
<text class="d_e_t">{{item.name}}</text>
<image class="d_e_img" src="/static/img/new_img.png" wx:if="{{pei_type == item.id}}"></image>
<image class="d_e_img" src="/static/img/img_t.png" wx:else></image>
</view>
</view>
<!-- 备注 -->
<view class="remarks public">
... ... @@ -76,7 +84,7 @@
<view class="arrow_pop">
<view class="popup_" wx:if="{{orderContent.red_num == 0}}">无可用优惠券</view>
<view class="popup_" wx:else>
{{shifu.red_name=='' ? '有'+orderContent.red_num +'张可用' : shifu.red_name}}
{{shifu.red_name=='' ? '有'+orderContent.red_num +'张可用' : shifu.red_name}}
</view>
<image src="{{imagesUrl}}assets/static/img/right_arrow.png" />
</view>
... ...
... ... @@ -140,6 +140,24 @@ page {
justify-content: space-between;
background-color: #fff;
}
/* 配送改 */
.dis-express {
width: 25%;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
}
.dis-express .d_e_t {
font-size: 28rpx;
color: #3D444C;
}
.dis-express .d_e_img {
width: 30rpx;
height: 30rpx;
}
.container .public .public_1 {
font-size: 28rpx;
line-height: 48rpx;
... ...
... ... @@ -31,6 +31,18 @@ Page({
paySign: '',
di_pay: '',
pathed: 3,
// 配送改
pei:[
{
name:'快递配送',
id:1
},
{
name:'自提',
id:2
},
],
pei_type:1
},
onLoad: function (options) {
... ... @@ -49,10 +61,17 @@ Page({
onShow: function () {
},
nextDeliveryservice() {
// wx.navigateTo({
// url: '/pages/deliveryservice/deliveryservice?title=' + this.data.service
// })
// nextDeliveryservice() {
// wx.navigateTo({
// url: '/pages/deliveryservice/deliveryservice?title=' + this.data.service
// })
// },
// 配送改
choosePeiType(e){
this.setData({
pei_type:e.currentTarget.dataset.type
})
console.log(this.data.pei_type)
},
goRedPacketd(e) {
let order_no = e.currentTarget.dataset.order_no
... ... @@ -106,11 +125,12 @@ Page({
request({
url: 'api/shop4s/buyPei2',
data: {
order_no: that.data.order_no,
order_no: that.data.order_no,
type: that.data.type,
bei: that.data.bei,
address_id: that.data.address.id,
list_id: that.data.list_id
list_id: that.data.list_id,
pei_type:that.data.pei_type
}
}).then(res => {
if (res.data.data.type == 0) {
... ...
<view class="container">
<view class="addressde" bindtap="changeReceiverAddress" wx:if='{{!address_id}}'>
<view class="cdddd">+点击添加收货地址</view>
<view class="arrow_r">
<image src="{{imagesUrl}}assets/static/img/right_arrow.png" />
</view>
</view>
<view class="address" wx:else>
<view class="city">{{address.address}}</view>
<view class="addressDetails">{{address.address2}}</view>
<view class="person_">
<view class="person_ziliao">
<text class="person_name persongeren">{{address.name}}</text>
<text class="person_phone persongeren">{{address.phone}}</text>
</view>
<view class="arrow_r" bindtap="changeReceiverAddress">
<!-- 配送改 -->
<block wx:if="{{pei_type == 1}}">
<view class="addressde" bindtap="changeReceiverAddress" wx:if='{{!address_id}}'>
<view class="cdddd">+点击添加收货地址</view>
<view class="arrow_r">
<image src="{{imagesUrl}}assets/static/img/right_arrow.png" />
</view>
</view>
</view>
<view class="address" wx:else>
<view class="city">{{address.address}}</view>
<view class="addressDetails">{{address.address2}}</view>
<view class="person_">
<view class="person_ziliao">
<text class="person_name persongeren">{{address.name}}</text>
<text class="person_phone persongeren">{{address.phone}}</text>
</view>
<view class="arrow_r" bindtap="changeReceiverAddress">
<image src="{{imagesUrl}}assets/static/img/right_arrow.png" />
</view>
</view>
</view>
</block>
<view class="zhuang">
<image src="{{imagesUrl}}assets/static/img/zhuangshi_img@2x.png" />
</view>
... ... @@ -54,7 +57,13 @@
<!-- 配送 -->
<view class="distribution public">
<text class="service public_1">配送服务</text>
<text class="service_right public_2" catchtap="nextDeliveryservice">{{service}}</text>
<!-- <text class="service_right public_2" catchtap="nextDeliveryservice">{{service}}</text> -->
<!-- 配送改 -->
<view class="dis-express" wx:for="{{pei}}" wx:key="index" bindtap="choosePeiType" data-type="{{item.id}}">
<text class="d_e_t">{{item.name}}</text>
<image class="d_e_img" src="/static/img/new_img.png" wx:if="{{pei_type == item.id}}"></image>
<image class="d_e_img" src="/static/img/img_t.png" wx:else></image>
</view>
</view>
<!-- 备注 -->
<view class="remarks public">
... ... @@ -77,7 +86,7 @@
<view class="arrow_pop">
<view class="popup_" wx:if="{{orderContent.red_num == 0}}">无可用优惠券</view>
<view class="popup_" wx:else>
{{shifu.red_name=='' ? '有'+orderContent.red_num +'张可用' : shifu.red_name}}
{{shifu.red_name=='' ? '有'+orderContent.red_num +'张可用' : shifu.red_name}}
</view>
<image src="{{imagesUrl}}assets/static/img/right_arrow.png" />
</view>
... ...
... ... @@ -5,6 +5,7 @@
/*使屏幕变暗 */
/*对话框 */
}
.container .address {
width: 100%;
padding: 32rpx 64rpx;
... ... @@ -13,36 +14,44 @@
flex-direction: column;
background-color: #fff;
}
.container .address .city {
font-size: 28rpx;
line-height: 50rpx;
}
.container .address .addressDetails {
font-size: 36rpx;
line-height: 70rpx;
font-weight: 600;
}
.container .address .person_ {
display: flex;
justify-content: space-between;
align-items: center;
}
.container .address .person_ .person_ziliao {
display: flex;
align-items: center;
}
.container .address .person_ .person_ziliao .persongeren {
font-size: 28rpx;
line-height: 50rpx;
margin-right: 30rpx;
}
.container .address .person_ .arrow_r {
width: 30rpx;
height: 50rpx;
}
.container .address .person_ .arrow_r image {
width: 100%;
}
.container .addressde {
width: 100%;
padding: 32rpx 64rpx;
... ... @@ -52,44 +61,54 @@
justify-content: space-between;
background-color: #fff;
}
.container .addressde .cdddd {
flex: 1;
font-size: 32rpx;
font-weight: bold;
}
.container .addressde .arrow_r {
width: 30rpx;
height: 50rpx;
}
.container .addressde .arrow_r image {
width: 100%;
}
.container .zhuang {
width: 100%;
position: relative;
top: 0rpx;
}
.container .zhuang image {
height: 6rpx;
}
.container .list_count {
padding: 0 32rpx;
box-sizing: border-box;
background-color: #fff;
}
.container .list_count .list {
display: flex;
border-bottom: 1rpx solid #f5f5f5;
padding: 30rpx 0;
box-sizing: border-box;
}
.container .list_count .list .left_imgs {
width: 208rpx;
height: 208rpx;
}
.container .list_count .list .left_imgs image {
width: 100%;
}
.container .list_count .list .right_cont {
flex: 1;
padding-left: 20rpx;
... ... @@ -97,78 +116,93 @@
flex-direction: column;
justify-content: space-between;
}
.container .list_count .list .right_cont .list_cont {
font-size: 32rpx;
line-height: 44rpx;
font-weight: 600;
}
.container .list_count .list .right_cont .money {
display: flex;
align-items: baseline;
justify-content: space-between;
}
.container .list_count .list .right_cont .money .goods_price {
display: flex;
align-items: baseline;
}
.container .list_count .list .right_cont .money .goods_price .money_icon {
font-size: 22rpx;
line-height: 44rpx;
font-weight: bold;
color: #FF444B;
}
.container .list_count .list .right_cont .money .goods_price .price {
font-size: 32rpx;
line-height: 44rpx;
font-weight: bold;
color: #FF444B;
}
.container .list_count .list .right_cont .money .count {
font-size: 28rpx;
line-height: 40rpx;
}
.container .list_count .listNoImg {
display: flex;
border-bottom: 1rpx solid #f5f5f5;
box-sizing: border-box;
padding: 20rpx 0;
}
.container .list_count .listNoImg .right_cont {
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.container .list_count .listNoImg .right_cont .list_cont {
font-size: 32rpx;
line-height: 44rpx;
font-weight: 600;
}
.container .list_count .listNoImg .right_cont .money {
display: flex;
align-items: baseline;
justify-content: space-between;
}
.container .list_count .listNoImg .right_cont .money .goods_price {
display: flex;
align-items: baseline;
}
.container .list_count .listNoImg .right_cont .money .goods_price .money_icon {
font-size: 22rpx;
line-height: 44rpx;
font-weight: bold;
color: #FF444B;
}
.container .list_count .listNoImg .right_cont .money .goods_price .price {
font-size: 32rpx;
line-height: 44rpx;
font-weight: bold;
color: #FF444B;
}
.container .list_count .listNoImg .right_cont .money .count {
font-size: 28rpx;
line-height: 40rpx;
}
.container .public {
margin-top: 20rpx;
width: 100%;
... ... @@ -178,38 +212,65 @@
justify-content: space-between;
background-color: #fff;
}
.container .public .public_1 {
font-size: 28rpx;
line-height: 48rpx;
color: #3D444C;
}
.container .public .public_2 {
font-size: 28rpx;
line-height: 48rpx;
color: #8C9198;
}
/* 配送改 */
.dis-express {
width: 25%;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
}
.dis-express .d_e_t {
font-size: 28rpx;
color: #3D444C;
}
.dis-express .d_e_img {
width: 30rpx;
height: 30rpx;
}
.container .public .red_imgs {
display: flex;
align-items: center;
}
.container .public .red_imgs .public_2 {
font-size: 28rpx;
line-height: 48rpx;
color: #8C9198;
}
.container .public .red_imgs .radios_fff {
width: 24rpx;
height: 24rpx;
margin-left: 20rpx;
}
.container .public .red_imgs .radios_red {
width: 24rpx;
height: 24rpx;
margin-left: 20rpx;
}
.container .integrate4S {
margin-top: 0;
}
.container .explain {
width: 100%;
padding: 32rpx;
... ... @@ -218,21 +279,25 @@
justify-content: space-between;
background-color: #fff;
}
.container .explain .explain_ {
font-size: 24rpx;
line-height: 48rpx;
color: #8C9198;
}
.container .explain .r_explain .explain__right {
font-size: 24rpx;
line-height: 48rpx;
}
.container .explain .r_explain .explain__red {
font-size: 24rpx;
line-height: 48rpx;
color: #E8370F;
margin: 0 5rpx;
}
.container .popupL {
margin: 20rpx 0;
width: 100%;
... ... @@ -242,17 +307,20 @@
background-color: #fff;
padding: 0 32rpx;
}
.container .popupL .popupName {
flex: 1;
font-size: 28rpx;
color: #3D444C;
}
.container .popupL .arrow_pop {
flex: 1;
display: flex;
align-items: center;
justify-content: flex-end;
}
.container .popupL .arrow_pop .popup_ {
flex: 1;
font-size: 28rpx;
... ... @@ -263,44 +331,55 @@
align-items: center;
justify-content: flex-end;
}
.container .popupL .arrow_pop image {
width: 32rpx;
height: 32rpx;
}
.container .down {
margin-bottom: 100rpx;
}
.container .down .store_num .store_money {
color: #E8370F;
}
.container .down .integrate_num {
margin-top: 0;
}
.container .down .integrate_num .integrate_money {
color: #E8370F;
}
.container .down .freight {
margin-top: 0;
}
.container .down .freight .freight_money {
color: #E8370F;
}
.container .goods_price {
display: flex;
align-items: baseline;
}
.container .goods_price .money_icon {
font-size: 22rpx;
line-height: 44rpx;
font-weight: bold;
color: #FF444B;
}
.container .goods_price .price {
font-size: 32rpx;
line-height: 44rpx;
font-weight: bold;
color: #FF444B;
}
.container .__total {
width: 100%;
padding: 0 20rpx 0 20rpx;
... ... @@ -311,25 +390,30 @@
bottom: 0;
background-color: #fff;
}
.container .__total .imgItem {
flex: 1;
display: flex;
align-items: center;
}
.container .__total .imgItem .payall {
margin-left: 20rpx;
font-size: 32rpx;
line-height: 44rpx;
}
.container .__total .imgItem .monery_red {
margin-left: 20rpx;
font-size: 32rpx;
line-height: 44rpx;
color: #E8370F;
}
.container .__total .downbtn {
width: 240rpx;
}
.container .__total .downbtn .btn {
width: 240rpx;
height: 80rpx;
... ... @@ -341,6 +425,7 @@
background-color: #E8370F;
color: #fff;
}
.container .commodity_screen {
width: 100%;
height: 100%;
... ... @@ -353,6 +438,7 @@
z-index: 1000;
color: #fff;
}
.container .commodity_attr_box {
height: 500rpx;
width: 100%;
... ... @@ -365,13 +451,15 @@
padding: 20rpx;
box-sizing: border-box;
}
.container .commodity_attr_box .bei {
padding: 32rpx;
box-sizing: border-box;
}
.container .commodity_attr_box .bne {
width: 100%;
position: fixed;
bottom: 0;
left: 32rpx;
}
}
\ No newline at end of file
... ...
import {
request
} from "../../request/index.js";
var WxParse = require('../../wxParse/wxParse.js');
const a = getApp()
// pages/LuckDraw/LuckDraw.js
Page({
/**
* 页面的初始数据
*/
data: {
// 活动id
id: 0,
// 顾问id
advisers_id: 0,
// 抽奖总数据
indexData: '',
play: true,
// 活动详情富文本
content: '',
// 奖品列表
awardList: [],
DrawList: ['关于小象', '活动规则', '获奖记录'],
imagesUrl: a.globalData.baseUrl,
// 新增
titleName: '',
showBindPhone: false,
title: false,
mode: 'rect',
indicatorPos: 'bottomCenter',
effect3d: false,
// 轮播图-结束
user_id: 0, //顾问id
chou: {}, //抽奖结果
chouGui: {}, //抽奖活动规则
chouLog: [], //获奖名单
indexData: {},
show: false, //展示页面
boxCheck: false,
showShareAlert: false,
showDrawAlert: false, //抽奖次数用完提示弹框
//抽奖次数用完弹框
drawOutInfo: {
imgUrl: '../../static/image/tongzhi_icon.png',
alertTxt: '您的抽奖机会已经用完',
otherTxt: '下一次活动再试试',
share_num: 0,
btnMt: 22,
btnTxt: '好的'
},
getRequireInfo: {
imgUrl: '../../static/image/zhuyi_icon.png',
alertTxt: '请填写完整信息'
},
showActRule: false, //展示活动规则弹框
getSuccessInfo: {
imgUrl: '../../static/image/chenggong_icon.png',
alertTxt: '提交成功'
},
showGetSuccess: false, //展示领取成功提示弹框
showRequireAlert: false, //展示必填项提示弹框
showPickInfo: false, //展示填写领取信息弹框
showGetDraw: false, //抽奖获得红包弹框
//红包弹框
redPackAlert: {
bgImgUrl: '../../static/image/hongbaotanchuang_img.png',
bgPdTop: '92rpx',
bgImgWidth: '602rpx',
bgImgHeight: '825rpx',
infoWidth: '428rpx',
infoHeight: '444rpx',
infoPdTop: '300rpx',
content: [
'恭喜您,抽中10元红包',
'可在获奖记录查看'
],
time: '',
address: '',
btnList: [
/* {
btnName:'去提现',
btnWidth:'48%',
type:'navTo',
url:''
},*/
{
btnName: '去分享',
btnWidth: '100%',
type: 'share',
url: ''
}
]
},
showCouponDraw: false, //展示抵用券中奖
//抵扣券弹框
couponAlert: {
bgImgUrl: '../../static/image/diyongquan_img.png',
bgPdTop: '132rpx',
bgImgWidth: '602rpx',
bgImgHeight: '785rpx',
infoWidth: '424rpx',
infoHeight: '396rpx',
infoPdTop: '308rpx',
content: ['恭喜您,抽中1000元抵用券'],
time: '',
address: '',
btnList: [{
btnName: '去分享',
btnWidth: '100%',
type: 'share',
url: ''
/* btnName:'去领奖',
btnWidth:'100%',
type:'coupon',
url:'' */
}]
},
showSnackAlert: false, //展示零食大礼包
//零食大礼包弹框
snackAlert: {
bgImgUrl: '../../static/image/libao_img.png',
bgPdTop: '132rpx',
bgImgWidth: '602rpx',
bgImgHeight: '865rpx',
infoWidth: '424rpx',
infoHeight: '474rpx',
infoPdTop: '310rpx',
content: ['恭喜您,抽中零食大礼包'],
time: '领取时间:2020/05/05-2021/05/20',
address: '领取地址:天津市南开区长江道4s店',
btnList: [{
btnName: '去分享',
btnWidth: '100%',
type: 'share',
url: ''
/* btnName:'知道了',
btnWidth:'100%',
type:'close',
url:'' */
}]
},
showIntegralAlert: false, //展示积分
//积分弹框
integralAlert: {
bgImgUrl: '../../static/image/jifen_img_bg.png',
bgPdTop: '116rpx',
bgImgWidth: '602rpx',
bgImgHeight: '801rpx',
infoWidth: '424rpx',
infoHeight: '410rpx',
infoPdTop: '310rpx',
content: ['恭喜您,抽中10积分'],
time: '',
address: '',
btnList: [{
btnName: '去分享',
btnWidth: '100%',
type: 'share',
url: ''
/* btnName:'',
btnWidth:'100%',
type:'program',
url:'' */
}]
},
actPeopleList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
showActPeople: false, //展示活动弹框
avatar_arr: [],
colorAwardDefault: "url('../../static/image/bg_img_4.png')",
colorAwardSelect: "url('../../static/image/bg_img_5.png')",
indexSelect: 0, //被选中的奖品索引
isRunning: false, //是否正在抽奖
lun_arr: [], //奖品图片数组
guInfo: {},
// 选中的品牌和id
brand: '',
brandId: 0,
brand2: '',
brandId2: 0,
// 最新的抽奖次数
newchouNum: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (e) {
wx.setStorageSync('drawId', e.id)
console.log(e, '传递的抽奖id')
if (e.id != undefined) {
this.setData({
id: e.id
})
this.getDrawList()
this.getAdvisers()
this.getnewchouNum()
this.addLiu()
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.setData({
brand: wx.getStorageSync('brand'),
brandId: wx.getStorageSync('brandId'),
brand2: wx.getStorageSync('brand2'),
brandId2: wx.getStorageSync('brandId2')
})
console.log(this.data.brand, this.data.brandId, '选中的品牌,抽奖页')
},
// 获取抽奖页数据
async getDrawList() {
let that = this
const {
data: {
data
}
} = await request({
url: 'api/h5/chouData',
data: {
id: that.data.id,
}
})
let countdownPer = parseFloat((data.all_time - data.sheng_time) / data.all_time).toFixed(2)
console.log(countdownPer, "剩余时间百分比")
console.log(data.all_time, data.sheng_time, '总时间和剩余时间')
that.setData({
indexData: data,
// 奖品列表
lun_arr: data.lun_arr,
content: data.detail,
countdownPer: countdownPer
})
WxParse.wxParse('content', 'html', that.data.content, that, 25);
if (that.data.lun_arr.length > 0) {
//奖品item设置
var awardList = [];
//间距,怎么顺眼怎么设置吧.
var topAward = 45;
var leftAward = 11;
for (var j = 0; j < 12; j++) {
if (j == 0) {
topAward = topAward;
leftAward = leftAward;
} else if (j < 4) {
topAward = topAward;
leftAward = leftAward + 132 + 12;
} else if (j < 7) {
leftAward = leftAward;
topAward = topAward + 132 + 8;
} else if (j < 10) {
leftAward = leftAward - 132 - 12;
topAward = topAward;
} else if (j < 13) {
leftAward = leftAward - 2;
topAward = topAward - 132 - 10;
}
var lun = that.data.lun_arr[j];
if (lun) {
awardList.push({
topAward: topAward,
leftAward: leftAward,
lun: lun
});
}
}
that.setData({
awardList: awardList
})
}
// 获取抽奖活动规则
request({
url: 'api/h5/chouGui',
data: {
id: that.data.id,
}
}).then(res => {
that.setData({
chouGui: res.data
})
})
// 获取抽奖活动数据
request({
url: 'api/h5/chouLog',
data: {
id: that.data.id,
}
}).then(res => {
that.setData({
chouLog: res.data.data.slice(0, 30)
})
})
},
//开始游戏
startGame: function () {
console.log(this.data.isRunning, this.data.sheng_time <= 0, this.data.indexData.sheng_time == -2, this.data.awardList.length != 12)
if (this.data.isRunning || this.data.sheng_time <= 0 || this.data.indexData.sheng_time == -2 || this.data.awardList.length != 12) return;
console.log('通过初始化')
console.log(this.data.isRunning, this.data.sheng_time <= 0, this.data.indexData.sheng_time == -2, this.data.awardList.length != 12)
if (this.data.newchouNum == 0) {
wx.showToast({
title: '非常抱歉,您本次活动抽奖机会已经用完啦',
icon: 'none'
})
this.setData({
showDrawAlert: true
})
return
}
this.setData({
isRunning: true
})
console.log('启动抽奖')
//获取奖品
request({
url: 'api/h5/chou',
data: {
id: this.data.id,
}
}).then(res => {
this.setData({
chou: res.data.data
})
console.log(this.data.chou, '获取奖品')
})
var _this = this;
var indexSelect = 0;
var i = 300;
var rooNum = 0;
function show() {
rooNum++
indexSelect++
indexSelect = indexSelect % 12;
_this.setData({
indexSelect: indexSelect
})
// console.log(_this.data.indexSelect,'已选中')
if (rooNum == 20) {
i = 600
}
//这里我只是简单粗暴用y=30*x+200函数做的处理.可根据自己的需求改变转盘速度
if (rooNum > 20 && _this.data.lun_arr[indexSelect].id == _this.data.chou.id) {
console.log(_this.data.lun_arr[indexSelect].id, _this.data.chou.id, '停止条件')
// var contentTxt = ''
// var btn = {
// btnName: '去分享',
// btnWidth: '100%',
// type: 'share',
// url: ''
// }
// 分享获得抽奖次数?
// if (_this.data.chou.share_num > 0) {
// contentTxt = '分享至朋友圈可获得' + _this.chou.share_num + '次抽奖机会'
// } else {
// btn = {
// btnName: '去领奖',
// btnWidth: '100%',
// type: 'coupon',
// url: '/pages/myPrize/myPrize?id=1'
// }
// }
//获取最新的抽奖次数
// if (_this.data.chou.type_id == 1) {
// _this.data.indexData.chou_num--
// } else {
// request('/api/h5/chouNum', {
// id: _this.id
// }).then((res) => {
// _this.data.indexData.chou_num = res.data.num
// })
// }
//抵用券
if (_this.data.chou.type_id == 2) {
_this.setData({
showCouponDraw: true
})
// let cc0 = _this.data.couponAlert.content[0]
// let cc1 = _this.data.couponAlert.content[1]
// let cbtn = _this.data.couponAlert.btnList[0]
// _this.setData({
// showCouponDraw : true,
// cc0:'恭喜您,抽中' + _this.data.chou.name,
// cc1:contentTxt,
// cbtn:btn
// })
// console.log(_this.data.couponAlert,'抵用券获奖信息')
}
//红包
if (_this.data.chou.type_id == 1) {
_this.setData({
showCouponDraw: true
})
}
//零食大礼包
if (_this.data.chou.type_id == 4) {
_this.setData({
showCouponDraw: true
})
}
//积分
if (_this.data.chou.type_id == 3) {
_this.setData({
showCouponDraw: true
})
}
_this.setData({
isRunning: false
})
} else {
// console.log(show,i,'定时器')
setTimeout(show, i);
}
}
show();
this.getnewchouNum()
},
// 获取顾问数据
async getAdvisers() {
let that = this
const {
data: {
data
}
} = await request({
url: 'api/h5/guInfo',
data: {
user_id: that.data.advisers_id,
}
})
// console.log(data);
// 数据为空时不显示顾问区
that.setData({
})
},
// 浏览量+1
async addLiu() {
let that = this
await request({
url: 'api/h5/addLiu',
data: {
id: that.data.id
}
})
},
// 获取最新的抽奖次数
async getnewchouNum() {
let that = this
const {
data: {
data
}
} = await request({
url: 'api/h5/chouNum',
data: {
id: that.data.id,
}
})
console.log(data, '最新抽奖次数');
that.setData({
newchouNum: data.num
})
},
// 返回顶部
returnTop() {
wx.pageScrollTo({
scrollTop: 0
});
},
// 弹出框--参与活动头像
showActpeo() {
this.setData({
showActPeople: true
})
},
// // 弹出框--关闭参与活动头像
closeActpeo() {
this.setData({
showActPeople: false
})
},
// 弹出--规则 介绍
clickActRule(e) {
let type = e.currentTarget.dataset.idx
if (type == 0) {
this.setData({
titleName: '关于小象',
showActRule: true
})
} else if (type == 1) {
this.setData({
titleName: '活动规则',
showActRule: true
})
} else if (type == 2) {
wx.navigateTo({
url: '/pages/myPrize/myPrize?drawid=' + this.data.id,
})
}
},
// 弹出--关闭规则介绍
clickCloseRule() {
this.setData({
showActRule: false
})
},
// 弹出--获取获奖人信息
bindPrize() {
this.setData({
showPickInfo: true
})
},
// 关闭获奖弹窗
f_d_a: function (e) {
console.log(e)
this.setData({
showCouponDraw: e.detail
})
},
// 关闭获取信息弹窗
p_z: function (e) {
this.setData({
showPickInfo: e.detail
})
},
})
\ No newline at end of file
... ...
{
"usingComponents": {
"countdown":"../../components/countdown/countdown",
"index-draw-alert":"../../components/Draw/index_draw_alert/index_draw_alert",
"get-prize":"../../components/Draw/getPrize/getPrize"
}
}
\ No newline at end of file
... ...
.box {
width: 100%;
height: 100%;
background: #190f65;
// banner图
.banner, .b-swiper,.b-swiper-item,.b-swiper-item-img{
width: 100%;
height: 480rpx;
}
// 内容
.inner {
width: 100%;
height: 100%;
padding: 0 50rpx;
box-sizing: border-box;
.video {
width: 100%;
height: 360rpx;
background: rgba(3, 0, 47, 0.60);
border: 2rpx solid #7E7495;
border-radius: 32rpx;
box-shadow: 0rpx 8rpx 216rpx 0rpx rgba(255, 182, 122, 0.35);
margin: 40rpx 0;
position: relative;
.preview {
width: 100%;
height: 100%;
border-radius: 20rpx;
box-shadow: 0rpx 8rpx 216rpx 0rpx rgba(255, 182, 122, 0.35);
border: 5rpx solid #8f83a2;
}
.back {
width: 100%;
height: 100%;
background: rgba(3, 0, 47, 0.60);
z-index: 1;
position: absolute;
top: 0;
border-radius: 32rpx;
}
.video-play {
width: 76rpx;
height: 76rpx;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-32rpx, -32rpx);
z-index: 2;
}
}
.draw {
width: 100%;
height: 800rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
// 规则
.rule {
width: 100%;
height: 40rpx;
display: flex;
justify-content: space-around;
position: absolute;
top: 50rpx;
.rule-in {
text:nth-of-type(1) {
font-size: 24rpx;
font-weight: 500;
color: #edecf2;
line-height: 40rpx;
}
}
}
// 奖品区
.container-in {
width: 600rpx;
height: 610rpx;
border-radius: 20rpx;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
.itemBg {
background: url(https://car.goorcar.com/assets/static/img/Rectangle2622@2x.png) no-repeat;
background-size: 100%;
height: 130rpx;
width: 140rpx;
}
.content-out {
position: absolute;
top: 0;
left: 0;
height: 130rpx;
width: 140rpx;
border-radius: 15rpx;
background-size: 100%;
.img {
display: flex;
justify-content: center;
padding-top: 8rpx;
.award-image {
height: 72rpx;
width: 72rpx;
}
}
.drawName {
text-align: center;
font-size: 24rpx;
color: #aa3a0c;
font-weight: 600;
}
.dyqName {
text-align: center;
font-size: 20rpx;
color: #fff;
line-height: 22rpx;
padding: 3rpx 5rpx 0 5rpx;
}
}
}
// 开始按钮
.startDraw {
width: 280rpx;
height: 300rpx;
position: absolute;
top: 50%;
transform: translateY(-112rpx);
}
}
// 倒计时
.countDown {
height: 320rpx;
position: relative;
padding: 0 40rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-around;
.progress {
position: relative;
height: 24rpx;
background: rgba(45, 40, 124, 0.20);
border-radius: 16rpx;
box-shadow: 0rpx 0rpx 10rpx 10rpx rgba(171, 171, 208, 0.20) inset, 0rpx 0rpx 5rpx 5rpx rgba(253, 202, 136, 0.30) inset;
.progressCom {
height: 24rpx;
position: absolute;
top: 0;
border-radius: 16rpx;
background: linear-gradient(to right, #6a5bdb, #fff);
}
}
//参与活动名单
.attend {
display: flex;
justify-content: space-between;
align-items: flex-end;
.listnum {
font-size: 28rpx;
color: #c7bfff;
text:nth-of-type(1) {
font-size: 28rpx;
color: #fea145;
}
}
.listhed {
display: flex;
align-items: center;
.listhed_in {
image:nth-of-type(1) {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
}
}
.arrow {
width: 25rpx;
height: 32rpx;
}
}
}
}
// 获奖名单
.win {
width: 100%;
height: 500rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.pic {
width: 328rpx;
height: 40rpx;
}
.swiper {
width: 100%;
height: 340rpx;
padding: 0 50rpx;
box-sizing: border-box;
display: flex;
align-items: center;
.list {
width: 100%;
height: 250rpx;
.list-in {
height: 80rpx;
line-height: 80rpx;
width: 100%;
display: flex;
justify-content: space-around;
border-bottom: 2rpx dashed gainsboro;
.l {
margin-left: 20rpx
}
.l_i_i {
margin-left: 50rpx;
text:nth-of-type(2) {
color: #F99E46;
font-size: 28rpx;
}
}
}
}
}
}
// 活动详情
.detail {
width: 100%;
height: auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.d-pic {
width: 340rpx;
height: 40px;
}
.actInfo {
width: 100%;
height: 1180rpx;
color: #06121e;
line-height: 44rpx;
font-size: 28rpx;
}
}
// 立即咨询
.consult {
width: 100%;
height: 160rpx;
margin-top: 50rpx;
}
// 销售顾问
.adviser {
width: 100%;
height: 325rpx;
display: flex;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
justify-content: space-between;
//头像
.ad-pic {
width: 180rpx;
height: 180rpx;
}
// 内容
.ad-det {
width: 65%;
height: 180rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
// 名字
.ad_det_t {
display: flex;
align-items: baseline;
text:nth-of-type(1) {
font-size: 40rpx;
font-weight: 500;
color: #ffffff;
display: block;
margin-right: 10rpx;
}
}
// 地址
.ad_det_c {
display: flex;
align-items: center;
}
// 联系方式
.ad_det_b {
display: flex;
align-items: center;
view:nth-of-type(1) {
width: 114rpx;
height: 44rpx;
margin-left: 30rpx;
}
}
}
}
// 推荐品牌
.recom {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
height: 460rpx;
justify-content: center;
.d-pic {
width: 340rpx;
height: 25px;
}
// 滚动内容
.swiper {
width: 100%;
height: 100%;
.swiper-item {
display: flex;
align-items: center;
image:nth-of-type(1) {
width: 100%;
height: 80%;
}
}
}
}
// 浏览量
.views {
width: 100%;
height: 136rpx;
line-height: 136rpx;
display: flex;
justify-content: space-around;
.txt {
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
}
}
// 批注
.mark {
width: 100%;
height: 140rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
margin-bottom: 50rpx;
.mark-v {
display: flex;
justify-content: space-around;
width: 90%;
text:nth-of-type(1) {
font-size: 22rpx;
font-weight: 400;
color: #ffffff;
}
}
}
}
// 返回顶部
.returnTop {
width: 100%;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #0a0052;
}
/* 活动人员弹框区域 */
.actPeopleWrap {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
padding: 162rpx 74rpx 0 74rpx;
.actPeople {
height: 844rpx;
background: #6b6aa8;
border: 8rpx solid #322d74;
border-radius: 16rpx;
.actTitle {
font-size: 32rpx;
color: #fff;
height: 128rpx;
line-height: 128rpx;
text-align: center;
font-weight: 600;
}
.actPeopleScroll {
height: 670rpx;
.actPeopleList {
display: flex;
flex-wrap: wrap;
padding: 0 10rpx;
.actItemWrap {
width: 20%;
height: 112rpx;
display: flex;
justify-content: center;
.actPeopleItem {
width: 88rpx;
height: 88rpx;
background: rgba(0, 0, 0, 0.00);
border-radius: 50%;
image:nth-of-type(1) {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
}
}
}
}
}
}
.closeBtn {
position: fixed;
width: 100%;
height: 48rpx;
top: 1050rpx;
left: 0;
display: flex;
justify-content: center;
image:nth-of-type(1) {
width: 48rpx;
height: 48rpx;
}
}
}
/* 活动规则弹框区域 */
.actRuleAlert {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
.actRule {
width: 70%;
height: 60%;
background: #7676b2;
border: 8rpx solid #383481;
border-radius: 40rpx;
padding: 0 34rpx;
display: flex;
flex-direction: column;
align-items: center;
.title {
height: 122rpx;
text-align: center;
line-height: 122rpx;
font-size: 32rpx;
font-weight: 600;
color: #fff;
}
.content {
height: 474rpx;
color: #fff;
}
.bottomBtn {
width: 424rpx;
height: 68rpx;
background: linear-gradient(113deg, #fed96c 0%, #ff9060 100%);
border-radius: 34rpx;
text-align: center;
line-height: 68rpx;
color: #fff;
font-size: 24rpx;
font-weight: 600;
margin-top: 22rpx;
}
}
}
.b {
background-size: contain;
background-repeat: no-repeat;
}
.t {
font-size: 28rpx;
font-weight: 400;
color: #ffffff;
}
.mark-t {
font-size: 22rpx;
font-weight: 400;
color: #c7bfff;
}
.litpic {
width: 30rpx;
height: 30rpx
}
}
\ No newline at end of file
... ...
<view class="box">
<!-- <image class="banner" src="{{imagesUrl}}assets/static/img/MaskGroup@2x.png"></image> -->
<view class="banner">
<swiper class="b-swiper" indicator-dots="true" autoplay="true" circular="true" >
<swiper-item wx:for="{{indexData.banner_img_arr}}" wx:key="index" class="b-swiper-item">
<image src="{{item}}" class="b-swiper-item-img"></image>
</swiper-item>
</swiper>
</view>
<view class="inner">
<view class="video">
<!-- <image class="preview" src="{{imagesUrl}}assets/static/img/Group708@2x.png"></image> -->
<video class="preview" src="{{indexData.video2}}" poster="{{indexData.video_img}}" object-fit="fill"
x5-video-player-type="h5" duration="{{indexData.video_long}}" show-center-play-btn="true"
bindtap="bindplay"></video>
<!-- <image class="video-play" src="{{imagesUrl}}assets/static/img/Group706@2x.png" ></image> -->
<!-- <view class="back"></view> -->
<!-- <video></video> -->
</view>
<!-- 抽奖区 -->
<view class="draw b" style="background-image: url({{imagesUrl}}assets/static/img/Group745@2x.png);">
<!-- 规则 -->
<view class="rule">
<view class="rule-in" wx:for="{{DrawList}}" wx:key="index" data-idx="{{index}}" bindtap="clickActRule">
<!-- <image></image> -->
<text class="r_i_t">{{item}}</text>
</view>
</view>
<!-- 奖品区 -->
<view class="container-in">
<view class="content-out" class="{{index==indexSelect?'content-out itemBg':'content-out'}}"
wx:for="{{awardList}}" wx:key="index"
style="top:{{item.topAward}}rpx;left:{{item.leftAward}}rpx;background-repeat: no-repeat">
<view class="img">
<image class="award-image" src="{{item.lun.image2}}"></image>
</view>
<view class="dyqName">
{{item.lun.name}}
</view>
</view>
</view>
<!-- 开始按钮 -->
<view class="startDraw b" style="background-image: url({{imagesUrl}}assets/static/img/Group744@2x.png);"
bindtap="startGame"></view>
</view>
<!-- 倒计时 -->
<view class="countDown b" style="background-image: url({{imagesUrl}}assets/static/img/Group739@2x.png);">
<!-- 时钟 -->
<countdown is-day="true" tip-text="' '" day-text="' '" hour-text="':'" minute-text="':'" second-text="' '"
datatime="{{indexData.end_time2}}"></countdown>
<view>{{text}}</view>
<!-- 进度条 -->
<view class="progress">
<view style="width:{{countdownPer*100}}%" class="progressCom">
{{countdownper}}</view>
</view>
<!-- 活动参与名单 -->
<view class="attend">
<view class="listnum">
共有
<text>{{indexData.can_num}}</text>
人参与了活动
</view>
<!-- 头像展示 -->
<view class="listhed" bindtap="showActpeo">
<view class="listhed_in" wx:for="{{indexData.avatar_arr}}" wx:key="index" wx:if="{{index<3}}"
style='transform:translateX({{-index*10}}rpx)'>
<image src="{{item}}"></image>
</view>
<image class="arrow" src="{{imagesUrl}}assets/static/img/arrow@2x.png"></image>
</view>
</view>
</view>
<!-- 获奖名单 -->
<view class="win">
<view class="pic b" style="background-image: url({{imagesUrl}}assets/static/img/Group705@2x.png)"></view>
<view class="swiper b" style="background-image: url({{imagesUrl}}assets/static/img/group104561@2x.png)">
<!-- 获奖明细 -->
<swiper class="list" autoplay="true" vertical="true" interval="1000" duration="1000" display-multiple-items="3"
circular="true" disable-touch="true">
<swiper-item wx:for="{{chouLog}}" wx:key="index">
<view class="list-in">
<text class="t">{{item.user_name}}</text>
<text class="mark-t l">{{item.huo_time}}</text>
<view class="l_i_i">
<text class="t">获得</text>
<text>{{item.name}}</text>
</view>
</view>
</swiper-item>
</swiper>
</view>
</view>
<!-- 活动详情 -->
<view class="detail">
<view class="d-pic b" style="background-image: url({{imagesUrl}}assets/static/img/Group753@2x.png)"></view>
<view class="rich-text">
<scroll-view scroll-y class="actInfo">
<import src="../../wxParse/wxParse.wxml" />
<template is="wxParse" data="{{wxParseData:content.nodes}}" />
</scroll-view>
</view>
</view>
<!-- 立即咨询 -->
<view class="consult b" style="background-image: url({{imagesUrl}}assets/static/img/group104551@2x.png)"
bindtap="bindPrize" wx:if="{{false}}">
</view>
<!-- 销售顾问 -->
<view class="adviser b" style="background-image: url({{imagesUrl}}assets/static/img/Group739@2x.png)" wx:if="{{false}}">
<!-- 头像 -->
<view class="ad-pic b" style="background-image: url({{imagesUrl}}assets/static/img/Rectangle2610@2x.png)"></view>
<!-- 信息 -->
<view class="ad-det">
<view class="ad_det_t">
<text>{{indexData.user_name}}</text>
<text class="t">{{indexData.job}}</text>
</view>
<view class="ad_det_c">
<image class="litpic" src="{{imagesUrl}}assets/static/img/Iconly_Bulk_Send@2x.png"></image>
<text class="t">{{indexData.s4_name}}</text>
</view>
<view class="ad_det_b">
<image class="litpic" src="{{imagesUrl}}assets/static/img/Iconly_Bulk_Calling@2x.png"></image>
<text class="t">{{indexData.mobile}}</text>
<view class="b" style="background-image: url({{imagesUrl}}assets/static/img/Frame703@2x.png)"></view>
</view>
</view>
</view>
<!-- 推荐品牌 -->
<view class="recom">
<!-- 品牌标题 -->
<view class="d-pic b" style="background-image: url({{imagesUrl}}assets/static/img/Group753@2x.png)"></view>
<!-- 滚动内容 -->
<view class="adviser b" style="background-image: url({{imagesUrl}}assets/static/img/Group739@2x.png)">
<!-- swiper -->
<swiper class="swiper" circular="true" autoplay="true" next-margin="16rpx">
<block wx:for="{{indexData.pin_img_arr}}" wx:key="index">
<swiper-item class="swiper-item">
<image src="{{item}}"></image>
</swiper-item>
</block>
</swiper>
</view>
</view>
<!-- 浏览量 -->
<view class="views">
<text class="txt">浏览量:{{indexData.liu_num}}</text>
<text class="txt">合作咨询:{{indexData.ask_mobile}}</text>
</view>
<!-- 批注 -->
<view class="mark">
<text class="mark-t">粤文网【2017】6138-1456号</text>
<view class="mark-v">
<text class="mark-vt">Copyright</text>
<text class="mark-t">1998-2021 Tencent.All Rights Reserved.</text>
</view>
<text class="mark-t">小象优选 版权所有</text>
</view>
</view>
<view class="returnTop t" bindtap="returnTop">返回顶部</view>
<!-- 展示参与活动人员弹框区域 -->
<view class="actPeopleWrap" wx:if="{{showActPeople}}">
<view class="actPeople">
<view class="actTitle">
共有{{indexData.can_num}}人参与了活动
</view>
<scroll-view scroll-y class="actPeopleScroll">
<view class="actPeopleList">
<view class="actItemWrap" wx:for="{{indexData.avatar_arr}}" wx:key="index">
<view class="actPeopleItem">
<image src="{{item}}" mode=""></image>
</view>
</view>
</view>
</scroll-view>
</view>
<view class="closeBtn">
<image src="../../static/img/close.png" mode="" data-click="false" bindtap="closeActpeo"></image>
</view>
</view>
<!-- 活动规则弹框区域 -->
<view class="actRuleAlert" wx:if="{{showActRule}}">
<view class="actRule">
<view class="title">
{{titleName}}
</view>
<scroll-view scroll-y class="content">
<rich-text class="dialog-content" nodes="{{chouGui.data.gui}}" style="width: 100%;"></rich-text>
<!-- <parse :content="chouGui.gui" :imageProp="{'domain':'www.mall.com'}"></parse> -->
</scroll-view>
<view class="bottomBtn" bindtap="clickCloseRule">
我知道了
</view>
</view>
</view>
<!-- 抵用券中奖弹框区域 -->
<index-draw-alert bind:from_draw_alert="f_d_a" wx:if="{{showCouponDraw}}" getchouName="{{chou.name}}" getchouLogid="{{chou.log_id}}" drawid="{{id}}"></index-draw-alert>
<!-- 领取信息弹框区域 -->
<get-prize wx:if="{{showPickInfo}}" bind:from_prize="p_z" brand="{{brand}}" brandId="{{brandId}}" brand2="{{brand2}}" brandId2="{{brandId2}}" drawid="{{id}}"></get-prize>
</view>
\ No newline at end of file
... ...
.box {
width: 100%;
height: 100%;
background: #190f65;
/* 活动人员弹框区域 */
/* 活动规则弹框区域 */
}
.box .banner,.b-swiper,.b-swiper-item,.b-swiper-item-img {
width: 100%;
height: 400rpx;
}
.box .inner {
width: 100%;
height: 100%;
padding: 0 50rpx;
box-sizing: border-box;
}
.box .inner .video {
width: 100%;
height: 360rpx;
background: rgba(3, 0, 47, 0.6);
border: 2rpx solid #7E7495;
border-radius: 32rpx;
box-shadow: 0rpx 8rpx 216rpx 0rpx rgba(255, 182, 122, 0.35);
margin: 40rpx 0;
position: relative;
}
.box .inner .video .preview {
width: 100%;
height: 100%;
border-radius: 20rpx;
box-shadow: 0rpx 8rpx 216rpx 0rpx rgba(255, 182, 122, 0.35);
border: 5rpx solid #8f83a2;
}
.box .inner .video .back {
width: 100%;
height: 100%;
background: rgba(3, 0, 47, 0.6);
z-index: 1;
position: absolute;
top: 0;
border-radius: 32rpx;
}
.box .inner .video .video-play {
width: 76rpx;
height: 76rpx;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-32rpx, -32rpx);
z-index: 2;
}
.box .inner .draw {
width: 100%;
height: 800rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.box .inner .draw .rule {
width: 100%;
height: 40rpx;
display: flex;
justify-content: space-around;
position: absolute;
top: 50rpx;
}
.box .inner .draw .rule .rule-in text:nth-of-type(1) {
font-size: 24rpx;
font-weight: 500;
color: #edecf2;
line-height: 40rpx;
}
.box .inner .draw .container-in {
width: 600rpx;
height: 610rpx;
border-radius: 20rpx;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
.box .inner .draw .container-in .itemBg {
background: url(https://car.goorcar.com/assets/static/img/Rectangle2622@2x.png) no-repeat;
background-size: 100%;
height: 130rpx;
width: 140rpx;
}
.box .inner .draw .container-in .content-out {
position: absolute;
top: 0;
left: 0;
height: 130rpx;
width: 140rpx;
border-radius: 15rpx;
background-size: 100%;
}
.box .inner .draw .container-in .content-out .img {
display: flex;
justify-content: center;
padding-top: 8rpx;
}
.box .inner .draw .container-in .content-out .img .award-image {
height: 72rpx;
width: 72rpx;
}
.box .inner .draw .container-in .content-out .drawName {
text-align: center;
font-size: 24rpx;
color: #aa3a0c;
font-weight: 600;
}
.box .inner .draw .container-in .content-out .dyqName {
text-align: center;
font-size: 20rpx;
color: #fff;
line-height: 22rpx;
padding: 3rpx 5rpx 0 5rpx;
}
.box .inner .draw .startDraw {
width: 280rpx;
height: 300rpx;
position: absolute;
top: 50%;
transform: translateY(-112rpx);
}
.box .inner .countDown {
height: 320rpx;
position: relative;
padding: 0 40rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.box .inner .countDown .progress {
position: relative;
height: 24rpx;
background: rgba(45, 40, 124, 0.2);
border-radius: 16rpx;
box-shadow: 0rpx 0rpx 10rpx 10rpx rgba(171, 171, 208, 0.2) inset, 0rpx 0rpx 5rpx 5rpx rgba(253, 202, 136, 0.3) inset;
}
.box .inner .countDown .progress .progressCom {
height: 24rpx;
position: absolute;
top: 0;
border-radius: 16rpx;
background: linear-gradient(to right, #6a5bdb, #fff);
}
.box .inner .countDown .attend {
display: flex;
justify-content: space-between;
align-items: flex-end;
}
.box .inner .countDown .attend .listnum {
font-size: 28rpx;
color: #c7bfff;
}
.box .inner .countDown .attend .listnum text:nth-of-type(1) {
font-size: 28rpx;
color: #fea145;
}
.box .inner .countDown .attend .listhed {
display: flex;
align-items: center;
}
.box .inner .countDown .attend .listhed .listhed_in image:nth-of-type(1) {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
}
.box .inner .countDown .attend .listhed .arrow {
width: 25rpx;
height: 32rpx;
}
.box .inner .win {
width: 100%;
height: 500rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.box .inner .win .pic {
width: 328rpx;
height: 40rpx;
}
.box .inner .win .swiper {
width: 100%;
height: 340rpx;
padding: 0 50rpx;
box-sizing: border-box;
display: flex;
align-items: center;
}
.box .inner .win .swiper .list {
width: 100%;
height: 250rpx;
}
.box .inner .win .swiper .list .list-in {
height: 80rpx;
line-height: 80rpx;
width: 100%;
display: flex;
justify-content: space-around;
border-bottom: 2rpx dashed gainsboro;
}
.box .inner .win .swiper .list .list-in .l {
margin-left: 20rpx;
}
.box .inner .win .swiper .list .list-in .l_i_i {
margin-left: 50rpx;
}
.box .inner .win .swiper .list .list-in .l_i_i text:nth-of-type(2) {
color: #F99E46;
font-size: 28rpx;
}
.box .inner .detail {
width: 100%;
height: auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.box .inner .detail .d-pic {
width: 340rpx;
height: 40px;
}
.box .inner .detail .actInfo {
width: 100%;
/* height: 1180rpx; */
color: #06121e;
line-height: 44rpx;
font-size: 28rpx;
}
.box .inner .consult {
width: 100%;
height: 160rpx;
margin-top: 50rpx;
}
.box .inner .adviser {
width: 100%;
height: 325rpx;
display: flex;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
justify-content: space-between;
}
.box .inner .adviser .ad-pic {
width: 180rpx;
height: 180rpx;
}
.box .inner .adviser .ad-det {
width: 65%;
height: 180rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.box .inner .adviser .ad-det .ad_det_t {
display: flex;
align-items: baseline;
}
.box .inner .adviser .ad-det .ad_det_t text:nth-of-type(1) {
font-size: 40rpx;
font-weight: 500;
color: #ffffff;
display: block;
margin-right: 10rpx;
}
.box .inner .adviser .ad-det .ad_det_c {
display: flex;
align-items: center;
}
.box .inner .adviser .ad-det .ad_det_b {
display: flex;
align-items: center;
}
.box .inner .adviser .ad-det .ad_det_b view:nth-of-type(1) {
width: 114rpx;
height: 44rpx;
margin-left: 30rpx;
}
.box .inner .recom {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
height: 460rpx;
justify-content: center;
}
.box .inner .recom .d-pic {
width: 340rpx;
height: 25px;
}
.box .inner .recom .swiper {
width: 100%;
height: 100%;
}
.box .inner .recom .swiper .swiper-item {
display: flex;
align-items: center;
}
.box .inner .recom .swiper .swiper-item image:nth-of-type(1) {
width: 100%;
height: 80%;
}
.box .inner .views {
width: 100%;
height: 136rpx;
line-height: 136rpx;
display: flex;
justify-content: space-around;
}
.box .inner .views .txt {
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
}
.box .inner .mark {
width: 100%;
height: 140rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
margin-bottom: 50rpx;
}
.box .inner .mark .mark-v {
display: flex;
justify-content: space-around;
width: 90%;
}
.box .inner .mark .mark-v text:nth-of-type(1) {
font-size: 22rpx;
font-weight: 400;
color: #ffffff;
}
.box .returnTop {
width: 100%;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #0a0052;
}
.box .actPeopleWrap {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
padding: 162rpx 74rpx 0 74rpx;
}
.box .actPeopleWrap .actPeople {
height: 844rpx;
background: #6b6aa8;
border: 8rpx solid #322d74;
border-radius: 16rpx;
}
.box .actPeopleWrap .actPeople .actTitle {
font-size: 32rpx;
color: #fff;
height: 128rpx;
line-height: 128rpx;
text-align: center;
font-weight: 600;
}
.box .actPeopleWrap .actPeople .actPeopleScroll {
height: 670rpx;
}
.box .actPeopleWrap .actPeople .actPeopleScroll .actPeopleList {
display: flex;
flex-wrap: wrap;
padding: 0 10rpx;
}
.box .actPeopleWrap .actPeople .actPeopleScroll .actPeopleList .actItemWrap {
width: 20%;
height: 112rpx;
display: flex;
justify-content: center;
}
.box .actPeopleWrap .actPeople .actPeopleScroll .actPeopleList .actItemWrap .actPeopleItem {
width: 88rpx;
height: 88rpx;
background: rgba(0, 0, 0, 0);
border-radius: 50%;
}
.box .actPeopleWrap .actPeople .actPeopleScroll .actPeopleList .actItemWrap .actPeopleItem image:nth-of-type(1) {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
}
.box .actPeopleWrap .closeBtn {
position: fixed;
width: 100%;
height: 48rpx;
top: 1050rpx;
left: 0;
display: flex;
justify-content: center;
}
.box .actPeopleWrap .closeBtn image:nth-of-type(1) {
width: 48rpx;
height: 48rpx;
}
.box .actRuleAlert {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
}
.box .actRuleAlert .actRule {
width: 70%;
height: 60%;
background: #7676b2;
border: 8rpx solid #383481;
border-radius: 40rpx;
padding: 0 34rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.box .actRuleAlert .actRule .title {
height: 122rpx;
text-align: center;
line-height: 122rpx;
font-size: 32rpx;
font-weight: 600;
color: #fff;
}
.box .actRuleAlert .actRule .content {
height: 474rpx;
color: #fff;
}
.box .actRuleAlert .actRule .bottomBtn {
width: 424rpx;
height: 68rpx;
background: linear-gradient(113deg, #fed96c 0%, #ff9060 100%);
border-radius: 34rpx;
text-align: center;
line-height: 68rpx;
color: #fff;
font-size: 24rpx;
font-weight: 600;
margin-top: 22rpx;
}
.box .b {
background-size: contain;
background-repeat: no-repeat;
}
.box .t {
font-size: 28rpx;
font-weight: 400;
color: #ffffff;
}
.box .mark-t {
font-size: 22rpx;
font-weight: 400;
color: #c7bfff;
}
.box .litpic {
width: 30rpx;
height: 30rpx;
}
... ...
... ... @@ -244,6 +244,7 @@ Page({
},
async returnMoney(e) { // 申请退款
let that = this
that.Subscribe()
try {
const {
data
... ... @@ -271,6 +272,32 @@ Page({
}
},
//调起订阅消息 /退款通知
Subscribe(){
return new Promise((resolve, reject) => {
wx.requestSubscribeMessage({
tmplIds: ["dLkIUNEHhOTyzKeh5qWDgecUT8KR11MsC6vZfin8s2o"],
success: (res) => {
if (res['dLkIUNEHhOTyzKeh5qWDgecUT8KR11MsC6vZfin8s2o'] === 'accept'){
wx.showToast({
title: '订阅OK!',
duration: 1000,
success(data) {
//成功
resolve()
}
})
}
},
fail(err) {
//失败
console.error(err);
reject()
}
})
})
},
Immediate(e) { // 立即评价
let order_no = e.currentTarget.dataset.order_no
let token = wx.getStorageSync("token")
... ... @@ -421,4 +448,6 @@ Page({
mask: true
})
},
})
\ No newline at end of file
... ...
... ... @@ -18,14 +18,19 @@ Page({
city_id: '',
pin_id: '',
shortnameCity: '',
home_form: '', // 从首页搜索过来
home_form: '', // 从首页搜索过来,
pageroute: ''
},
onLoad: function (options) {
let that = this
// console.log(options);
let pages = getCurrentPages();
let prevpage = pages[pages.length - 2];
that.setData({
home_form: options.home || '',
pageroute: prevpage.route
})
},
onShow: function () {
let that = this
... ... @@ -95,6 +100,7 @@ Page({
pin_id: data.pin.id,
pinName: data.pin.name,
})
} catch (err) {
// console.log(err);
a.popTest(err.msg)
... ... @@ -162,11 +168,26 @@ Page({
changed4S(e) { // 去4sd店
let that = this
let s4_id = e.currentTarget.dataset.id
let s4_name = e.currentTarget.dataset.name
let token = wx.getStorageSync('token')
if (token) {
let pageroute = that.data.pageroute
console.log(token,'外部')
console.log(that.data.pageroute,'外部')
if (token && pageroute == 'pages/4Sstore/4Sstore' || token && pageroute == 'pages/Vnew4Sstore/Vnew4Sstore') {
console.log(token,'4s商店进入')
console.log(that.data.pageroute,'4s商店进入')
wx.navigateTo({
url: '/pages/Vnew4Sstore/Vnew4Sstore?s4_id=' + s4_id
})
}else if (token && pageroute == 'pages/VtuanConfirm/VtuanConfirm' || token && pageroute == 'pages/distributionChanged/distributionChanged') {
console.log(token,'购买页进入')
console.log(that.data.pageroute,'购买页进入')
wx.setStorageSync('s4_id',s4_id,)
wx.setStorageSync('s4_name', s4_name)
wx.navigateBack({
delta: 1,
})
} else {
that.goLogin()
}
... ... @@ -184,28 +205,6 @@ Page({
},
async public() {
let that = this
try {
... ...
... ... @@ -21,7 +21,7 @@
<view class="listList">
<block wx:if="{{moreList.length != 0}}">
<block wx:for="{{moreList}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class="bind_item" bindtap="changed4S" data-id="{{item.id}}">
<view class="bind_item" bindtap="changed4S" data-id="{{item.id}}" data-name="{{item.name}}">
<view class="bind_box">
<view class="b_name">{{item.name}}</view>
<view class="b_star {{item.guan_id == 1 ? 'b_sta_color' : ''}}" catchtap="clickAttention" data-id="{{item.id}}">
... ...
... ... @@ -32,7 +32,7 @@ Page({
// 同 4Sstore 页面相同
onLoad: function (options) {
let that = this
// console.log("分享", options);
console.log("分享", options);
if (options.is_share) {
that.setData({
s4_id: options.s4_id,
... ... @@ -211,7 +211,7 @@ Page({
s4_id: that.data.s4_id
}
})
// console.log(data);
console.log(data);
if (data != null) {
that.setData({
kefu: data.kefu,
... ... @@ -219,6 +219,8 @@ Page({
it_cloose: false,
s4_id: data.id
})
wx.setStorageSync('s4_id',data.id)
wx.setStorageSync('s4_name', data.name)
} else {
that.setData({
it_cloose: true,
... ... @@ -250,7 +252,7 @@ Page({
s4_id: that.data.s4_id
}
})
// console.log(data);
console.log(data);
that.setData({
hotActivity: data,
})
... ...
... ... @@ -34,11 +34,48 @@ Page({
list_id: '', // 优惠券id
tuan_id: '',
s4id: '',
// 展示弹出
bind4sClerk: '',
showClerk: false,
// 从4s选择页拿回的数据
s4_id: '',
s4_name: '',
s4_name: '',
// 测试
code: 0,
// 店员列表
ClerkList: '',
// 选中的店员
ClerkName: '',
// 选中的店员ID
ClerkId: '',
// 步骤条
steps: [{
text: '选择店员',
},
{
text: '确认信息',
},
{
text: '成功支付',
},
],
activeSteps: 0,
// 配送改
pei: [{
name: '快递配送',
id: 1
},
{
name: '自提',
id: 2
},
],
},
onLoad: function (options) {
let that = this
// console.log(options);
// console.log(options);
if (options.gui_arr) {
that.setData({
id: options.id,
... ... @@ -46,8 +83,6 @@ Page({
gui_arr: options.gui_arr,
tuan_id: options.tuan_id || '',
s4id: options.s4id
})
} else {
that.setData({
... ... @@ -57,9 +92,20 @@ Page({
s4id: options.s4id
})
}
that.getConfirmAnOrder()
},
onShow: function () {
let that = this
that.setData({
s4_id: wx.getStorageSync('s4_id'),
s4_name: wx.getStorageSync('s4_name')
})
// console.log(that.data.s4_id, that.data.s4_name)
},
onShow: function () {},
async getConfirmAnOrder() {
let that = this
try {
... ... @@ -95,13 +141,20 @@ Page({
}
},
nextDeliveryservice() {
if (this.data.s4id != 0) {
wx.navigateTo({
url: '/pages/deliveryservice/deliveryservice?title=' + this.data.service
})
}
// nextDeliveryservice() {
// if (this.data.s4id != 0) {
// wx.navigateTo({
// url: '/pages/deliveryservice/deliveryservice?title=' + this.data.service
// })
// }
// },
// 配送改
choosePeiType(e) {
this.setData({
pei_type: e.currentTarget.dataset.type
})
console.log(this.data.pei_type)
},
goRedPacketd(e) {
let order_no = e.currentTarget.dataset.order_no
... ... @@ -115,22 +168,141 @@ Page({
url: '/pages/receiverAddress/receiverAddress'
})
},
// //唤起弹窗
chooseClerk() {
let that = this
that.Subscribe()
if (that.data.address.id || that.data.pei_type == 2) {
that.setData({
bind4sClerk: true
})
} else {
a.popTest('请先选择收货地址')
}
},
// 点击选选择经销商
show4s() {
let that = this
wx.navigateTo({
url: '/pages/Vmore4SList/Vmore4SList',
})
},
// 点击选择店员
async showClerk() {
let that = this
let s4_name = that.data.s4_name
if (s4_name) {
that.setData({
showClerk: true
})
try {
const {
data
} = await request({
url: '/api/shop4s/clerkList',
data: {
s4_id: that.data.s4_id
}
})
} catch (err) {
that.setData({
ClerkList: err.data
})
}
} else {
wx.showToast({
title: '请先绑定4S店',
})
}
},
// 关闭绑定弹窗
onClose() {
this.setData({
bind4sClerk: false,
activeSteps: 0
});
},
// 选择绑定数据弹窗关闭
onshowClose() {
this.setData({
showClerk: false,
});
},
// 用户选选择的店员
onSelect(event) {
this.setData({
ClerkName: event.detail.name,
ClerkId: event.detail.id
})
console.log(this.data.ClerkId, this.data.s4_id)
},
// 点击确定,发送4s和店员数据
send4sClerk(e) {
let that = this
// 绑定4s和店员的判空
if (that.data.ClerkName && that.data.s4_name && that.data.activeSteps == 0) {
if (that.data.pei_type == 2) {
that.setData({
// bind4sClerk: false,
bindClerk: false,
activeSteps: that.data.activeSteps + 2
})
} else {
that.setData({
// bind4sClerk: false,
bindClerk: false,
activeSteps: that.data.activeSteps + 1
})
}
} else if (that.data.activeSteps == 2) {
that.setData({
bind4sClerk: false,
})
that.goTOpay()
} else if (that.data.ClerkName && that.data.s4_name && that.data.activeSteps == 1) {
that.setData({
activeSteps: that.data.activeSteps + 1
})
} else {
wx.showToast({
icon: 'none',
title: '请选择门店及店员',
})
}
},
goTOpay() { // 订单支付
let that = this
let obj = {
// 订单号
order_no: that.data.order_no,
// 积分
type: that.data.type,
// 备注
bei: that.data.bei,
// 地址
address_id: that.data.address.id || '',
// 优惠券id
list_id: that.data.list_id,
pei_type: that.data.pei_type
// 购买状态?
pei_type: that.data.pei_type,
// 绑定的店员id
s4_clerk_id: that.data.ClerkId
}
if (that.data.pei_type == 1) {
console.log(that.data.pei_type, '支付前得配送')
// 改
if (obj.address_id) {
console.log(obj.addre_id)
request({
url: 'api/gou/buy2',
data: obj
}).then(res => {
// 改
// console.log(res)
if (res.data.data.type == 0) {
wx.requestPayment({
timeStamp: res.data.data.timeStamp,
... ... @@ -139,18 +311,19 @@ Page({
signType: 'MD5',
paySign: res.data.data.paySign,
success(res) {
// console.log(res);
// console.log(res);
wx.redirectTo({
url: '/pages/VtuanOrder/VtuanOrder',
})
},
fail(res) {
console.log(res)
// console.log(res)
wx.redirectTo({
url: '/pages/VtuanOrder/VtuanOrder',
})
}
})
} else {
that.setData({
msg: '支付成功'
... ... @@ -162,14 +335,18 @@ Page({
})
}, 1000);
}
}).catch(err => {
a.popTest(err.msg)
// console.log(err);
})
} else {
a.popTest('请先选择收货地址')
}
// else {
// a.popTest('请先选择收货地址')
// }
} else {
// 改
console.log('成功支付')
request({
url: 'api/gou/buy2',
data: obj
... ... @@ -350,6 +527,30 @@ Page({
duration: 1300, //停留时间
})
},
//调起订阅消息 /团购成功
Subscribe(){
return new Promise((resolve, reject) => {
wx.requestSubscribeMessage({
tmplIds: ["Q_ecLnQbmEaiyVRYD7air0OVQnlF4daXW5WaXkx201U"],
success: (res) => {
if (res['Q_ecLnQbmEaiyVRYD7air0OVQnlF4daXW5WaXkx201U'] === 'accept'){
wx.showToast({
title: '订阅OK!',
duration: 1000,
success(data) {
//成功
resolve()
}
})
}
},
fail(err) {
//失败
console.error(err);
reject()
}
})
})
},
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-action-sheet": "@vant/weapp/action-sheet/index",
"van-steps": "@vant/weapp/steps/index"
},
"navigationBarTitleText": "确认订单"
}
\ No newline at end of file
... ...
<view class="container">
<block wx:if="{{service == '快递配送'}}">
<!-- <block wx:if="{{service == '快递配送'}}"> -->
<!-- 配送改 -->
<block wx:if="{{pei_type == 1}}">
<view class="address" wx:if="{{address_id}}">
<view class="city">{{address.address}}</view>
<view class="addressDetails">{{address.address2}}</view>
... ... @@ -19,10 +21,11 @@
<image src="{{imagesUrl}}assets/static/img/right_arrow.png" />
</view>
</view>
<view class="zhuang">
<image src="{{imagesUrl}}assets/static/img/zhuangshi_img@2x.png" />
</view>
</block>
<view class="zhuang">
<image src="{{imagesUrl}}assets/static/img/zhuangshi_img@2x.png" />
</view>
<view class="list_count">
<!-- 商品详情过来 -->
<view class="list">
... ... @@ -44,7 +47,13 @@
<!-- 配送 -->
<view class="distribution public" catchtap="nextDeliveryservice">
<text class="service public_1">配送服务</text>
<text class="service_right public_2">{{service}}</text>
<!-- <text class="service_right public_2">{{service}}</text> -->
<!-- 配送改 -->
<view class="dis-express" wx:for="{{pei}}" wx:key="index" bindtap="choosePeiType" data-type="{{item.id}}">
<text class="d_e_t">{{item.name}}</text>
<image class="d_e_img" src="/static/img/new_img.png" wx:if="{{pei_type == item.id}}"></image>
<image class="d_e_img" src="/static/img/img_t.png" wx:else></image>
</view>
</view>
<!-- 备注 -->
<view class="remarks public">
... ... @@ -109,7 +118,7 @@
<text class="price">{{all_pay}}</text>
</view>
</view>
<view class="downbtn" bindtap="goTOpay">
<view class="downbtn" bindtap="chooseClerk">
<button class="btn">确认支付</button>
</view>
</view>
... ... @@ -122,10 +131,69 @@
<input type="text" name="value" placeholder-class="input-placeholder" placeholder="请输入备注信息" />
</view>
<view class="bne">
<button style="margin: 30rpx 0 ; font-weight : 400; width:686rpx; background-color:#E8370F" type="primary" formType="submit">
<button style="margin: 30rpx 0 ; font-weight : 400; width:686rpx; background-color:#E8370F" type="primary"
formType="submit">
确认
</button>
</view>
</form>
</view>
<!-- 绑定4s&店员弹出 -->
<van-popup show="{{ bind4sClerk }}" bind:close="onClose" round
custom-style="{{activeSteps == 1?'height: 80%; width:80%':'height: 60%; width:80%'}}">
<view class="bind4sclerk">
<!-- 步骤条 -->
<van-steps steps="{{ steps }}" active="{{ activeSteps }}" active-color="#e8370f" />
<!-- 4s||店员 -->
<block wx:if="{{activeSteps == 0}}">
<text class="b4c">请选择您的专属顾问</text>
<view class="b4c-jxs" bindtap="show4s">
<text class="{{s4_name?'':'jxs_name'}}">{{s4_name?s4_name:'请选择经销商'}}</text>
<image class="row" src="/static/img/arrow.png"></image>
</view>
<view class="b4c-dy" bindtap="showClerk">
<text class="{{ClerkName?'':'dy_name'}}">{{ClerkName?ClerkName:'请选择店员'}}</text>
<image class="row" src="/static/img/arrow.png"></image>
</view>
<button class="btn" bindtap="send4sClerk">下一步</button>
</block>
<!-- 个人信息再确认 -->
<block wx:if="{{activeSteps == 1}}">
<text class="b4c">确认信息</text>
<view class="b4c-jxs">
<text class="jxs_name black">{{address.name}}</text>
</view>
<view class="b4c-dy">
<text class="dy_name black">{{address.phone}}</text>
</view>
<view class="personal">
<text class="p-text black">{{address.address}}{{address.address2}}</text>
</view>
<text class="remove" bindtap="changeReceiverAddress">切换收货地址</text>
<button class="btn" bindtap="send4sClerk">下一步</button>
</block>
<!-- 价格信息再确认 -->
<block wx:if="{{activeSteps == 2}}">
<text class="b4c">确认支付</text>
<view class="b4c-jxs">
<text class="jxs_name">运费</text>
<text class="colorRed">{{orderContent.yun == 0 ? '包邮':'¥' + orderContent.yun}}</text>
</view>
<view class="b4c-dy">
<text class="dy_name">实付金额</text>
<text class="colorRed">¥{{all_pay}}</text>
</view>
<button class="btn" bindtap="send4sClerk">下一步</button>
</block>
<text class="remarks">小象汽车互联网4s店将为您全程服务</text>
</view>
</van-popup>
<view class="b-inner">
<van-action-sheet show="{{ showClerk }}" actions="{{ ClerkList }}" bind:close="onshowClose"
bind:select="onSelect" />
</view>
</view>
\ No newline at end of file
... ...