作者 朱振飞

121

... ... @@ -4,14 +4,22 @@ Component({
* 组件的属性列表
*/
properties: {
tel: {
type: Number, // 接收父组件传过来的值
value: ''
},
},
/**
* 组件的初始数据
*/
data: {
},
onLoad(){
this.setData({
tel:wx.getStorageSync('tel')
})
console.log(this.data.tel)
},
/**
... ... @@ -19,6 +27,8 @@ Component({
*/
methods: {
tel(){
console.log(1212)
console.log(this.data.tel)
wx.makePhoneCall({
phoneNumber: wx.getStorageSync('tel')
})
... ...
... ... @@ -47,10 +47,10 @@ App({
// 滨海
var entrance_type = wx.getStorageSync("entrance_type");
console.log(entrance_type);
if (entrance_type == '1' || url == '/getopenid/get' || url.indexOf('address') > -1) {
if (entrance_type == '1' || url == '/getopenid/get' || url.indexOf('address') > -1 || url.indexOf('/wb/wb')>-1) {
//劳保商城入口
baseUrl = 'https://binhai.w.broing.cn/api';
} else if (entrance_type == '2') {
baseUrl = 'https://binhai.w.broing.cn/api';
} else if (entrance_type == '2') {
//工会商城入口
baseUrl = 'https://binhaigh.w.broing.cn/api';
} else if (entrance_type == '3') {
... ...
... ... @@ -44,6 +44,9 @@
"root": "packageA",
"pages": [
"pages/index/index",
"pages/choujiang/choujiang",
"pages/rule/rule",
"pages/record/record",
"pages/register/register",
"pages/login/login",
"pages/startindex/startindex",
... ... @@ -74,7 +77,7 @@
"pages/taocanpay/taocanpay",
"pages/orderdetail/orderdetail",
"pages/xianshi/xianshi"
]
]
}
],
"preloadRule":{
... ...
const app = getApp()
let timer;
let cjIn = false;
let cjChange = 0; //抽奖过程KEY
var interval = null;
Page({
/**
* 页面的初始数据
*/
data: {
prizeList: [{
id: '001',
index: 1,
imgsrc: '/images/shoubiao.png',
prizeName: '奖品名称111'
},
{
id: '002',
index: 2,
imgsrc: '/images/shoubiao.png',
prizeName: '奖品名称222'
},
{
id: '003',
index: 3,
imgsrc: '/images/shoubiao.png',
prizeName: '奖品名称333'
},
{
id: '004',
index: 4,
imgsrc: '/images/shoubiao.png',
prizeName: '奖品名称444'
},
{
id: '005',
index: 5,
imgsrc: '/images/shoubiao.png',
prizeName: '奖品名称555'
},
{
id: '006',
index: 6,
imgsrc: '/images/shoubiao.png',
prizeName: '奖品名称666'
},
{
id: '007',
index: 7,
imgsrc: '/images/shoubiao.png',
prizeName: '奖品名称777'
},
{
id: '008',
index: 8,
imgsrc: '/images/shoubiao.png',
prizeName: '奖品名称88888888888888'
},
],
cjChange: null, //抽奖过程KEY
prizeResult: null, //抽奖结果KEY
prizeName: null, //抽奖结果KEY对应的奖品名称
showAgain: false, //是否抽奖后显示再抽一次按钮
choujiang: false,
listzhong: [],
residue_total: '',
days: '',
hours: '',
minutes: '',
seconds: '',
beginchou: true,
text: ''
},
// 获取信息
getinfo() {
let that = this;
let url = '/gift/get_setting'
let params = {
}
app.post(url, params).then((res) => {
console.log(res, 373784478)
that.setData({
residue_total: res.msg.residue_total
})
if (res.msg.residue_time == 0) {
that.setData({
beginchou: false
})
}
var totalSecond = res.msg.residue_time;
// var totalSecond = r.countdown;
interval = setInterval(function () {
// 秒数
var second = totalSecond;
// 天数位
var day = Math.floor(second / 3600 / 24);
var dayStr = day.toString();
if (dayStr.length == 1) dayStr = '0' + dayStr;
// 小时位
var hr = Math.floor((second - day * 3600 * 24) / 3600);
var hrStr = hr.toString();
if (hrStr.length == 1) hrStr = '0' + hrStr;
// 分钟位
var min = Math.floor((second - day * 3600 * 24 - hr * 3600) / 60);
var minStr = min.toString();
if (minStr.length == 1) minStr = '0' + minStr;
// 秒位
var sec = second - day * 3600 * 24 - hr * 3600 - min * 60;
var secStr = sec.toString();
if (secStr.length == 1) secStr = '0' + secStr;
that.setData({
days: dayStr,
hours: hrStr,
minutes: minStr,
seconds: secStr,
})
totalSecond--;
if (totalSecond <= 0) {
clearInterval(interval);
// uni.showToast({
// title: '活动已结束',
// icon: 'none'
// });
// 倒计时结束
//that.countDown();
that.setData({
days: "00",
hours: "00",
minutes: "00",
seconds: "00",
beginchou: false
// endactive:true
})
}
}.bind(this), 1000);
})
},
// 开始抽奖
startchou() {
wx.showToast({
title: '抽奖还未开始,敬请期待',
icon: 'none'
})
},
// 活动规则
guize() {
wx.navigateTo({
url: '/packageA/pages/rule/rule',
})
},
// 中奖纪录
zhongjilu() {
wx.navigateTo({
url: '/packageA/pages/record/record',
})
},
// 获取礼物的接口
getpresent() {
let that = this;
let url = '/gift/get_gift'
let params = {
}
app.post(url, params).then((res) => {
console.log(res)
that.setData({
prizeList: res.msg
})
let newprizeList = that.data.prizeList;
newprizeList.forEach(function (value, index, array) {
value.index = index + 1
})
that.setData({
prizeList: newprizeList
})
})
},
//抽奖操作
cj() {
console.log(38483484)
// if(cjIn){
// console.log(9999)
// return;
// }else{
// cjIn = true;
// }
let This = this;
This.setData({
// 不能再抽奖
choujiang: true
})
// 获取抽到的礼物
let url = '/gift/extract'
let params = {
}
let res = {}
app.post(url, params).then((res) => {
console.log(res)
This.setData({
text: res
})
let newprizeList = This.data.prizeList;
newprizeList.forEach(function (value, index, array) {
if (value.id == res.msg.id) {
console.log(value)
res = {
stutus: 1,
prizeResult: value.index,
prizeName: value.name,
}
console.log(666554433, res)
if (res.stutus == 1) {
setTimeout(function () {
clearInterval(timer);
timer = setInterval(This.changePrize, 160);
setTimeout(function () {
clearInterval(timer);
timer = setInterval(This.changePrize, 300);
setTimeout(function () {
This.setData({
prizeResult: res.prizeResult,
prizeName: res.prizeName,
});
}, 1000)
}, 1000)
}, 2000)
cjIn = false;
cjChange = 0; //抽奖过程KEY
This.setData({
cjChange: null, //抽奖过程KEY
prizeResult: null, //抽奖结果KEY
prizeName: null, //抽奖结果KEY对应的奖品名称
showAgain: false, //是否抽奖后显示再抽一次按钮
});
}
clearInterval(timer);
timer = setInterval(This.changePrize, 80);
}
})
}).catch((err) => {
console.log(err)
This.setData({
// 可再次抽奖
choujiang: false,
cjIn: false
})
console.log(This.data.choujiang)
})
// test start
// res = {
// stutus:1,
// prizeResult:1,
// prizeName:'奖品名称88888888888888',
// }
// console.log(999999,res)
// test end
},
//抽奖过程奖品切换
changePrize() {
cjChange++;
cjChange = cjChange > 8 ? 1 : cjChange;
let This = this;
This.setData({
cjChange: cjChange
});
if (This.data.prizeResult == cjChange) {
clearInterval(timer);
This.setData({
showAgain: true,
// 可以再次抽奖
choujiang: false
});
if (This.data.text.msg.id == 8) {
wx.showToast({
title: '很遗憾,您没有中奖~',
icon: 'none'
})
} else {
wx.showToast({
title: '恭喜您中了' + text.msg.name + '奖品',
icon: 'none'
})
}
This.getinfo()
This.zhongjianglist()
console.log('获得奖品:' + This.data.prizeName)
}
},
//点击再抽一次按钮
againBtn() {
cjIn = false;
cjChange = 0; //抽奖过程KEY
let This = this;
This.setData({
cjChange: null, //抽奖过程KEY
prizeResult: null, //抽奖结果KEY
prizeName: null, //抽奖结果KEY对应的奖品名称
showAgain: false, //是否抽奖后显示再抽一次按钮
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getpresent();
// 获取中将记录
this.zhongjianglist()
// 获取信息
this.getinfo()
},
// 获取中奖名单
getzhongjianlist() {
let that = this;
let url = '/gift/get_gift_log1'
let params = {
}
console.log(999999999)
app.post(url, params).then((res) => {
console.log(res, 中奖纪录)
})
},
// 获取礼物的接口
zhongjianglist() {
console.log(347883443)
let that = this;
let url = '/gift/get_gift_log1'
let params = {
}
app.post(url, params).then((res) => {
console.log(res)
that.setData({
listzhong: res.msg
})
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<view class="chouimg">
<image src="https://binhai.w.broing.cn/image/b22ca3fa145158a572f9bf6953bfaab.png" mode="widthFix"></image>
<view class="remaincishu">您还有{{residue_total}}次抽奖机会</view>
<view class="pagebox">
<view class="box">
<view bindtap="{{choujiang==false?'cj':''}}" class="list">
<image src="/images/chou.png"></image>
</view>
<block wx:for="{{prizeList}}">
<view class="list {{cjChange == item.index ? 'change_in' : ''}}">
<view class="list_t">
<image src="{{item.image}}" mode="aspectFit"></image>
</view>
<view class="list_b">{{item.name}}</view>
</view>
</block>
</view>
</view>
<!-- 中奖名单 -->
<view class="zhonglist">
<view class="zhongtitle">
<text class="zhongleft">中奖</text>
<text class="zhongright">名单</text>
</view>
<view class="zhongbox">
<view class="zhongboxitem" wx:for="{{listzhong}}" wx:key="">
<view class="zhongboxleft flexone">
<view class="zhongtou">
<image src="{{item.image}}"></image>
</view>
<view class="zhongname">{{item.user_name}}</view>
</view>
<view class="zhongmiddle">{{item.name}}</view>
<view class="zhongrightk">{{item.tel}}</view>
</view>
</view>
</view>
<!-- 中奖 -->
<view class="prise">
<view class="jilu" bindtap="zhongjilu">
<view class="priseleft">
<image src="/images/jilu.png"></image>
</view>
<view class="zhongjilu">中奖记录</view>
</view>
<view class="jilu" bindtap="guize">
<view class="priseright">
<image src="/images/mingdan.png"></image>
</view>
<view class="huodongrule">活动规则</view>
</view>
</view>
</view>
<!-- 倒计时弹层 -->
<view class="register" wx:if="{{beginchou}}" catchtouchmove="true">
<view class="daowrap">
<image src="https://binhai.w.broing.cn/image/2d2481f1d7b95dd65feb853e7a7d243.png" mode="widthFix"></image>
</view>
<view class="daojitime">
<view class="hourtime hourday">{{days}}</view>
<view class="hourtime hourhour">{{hours}}</view>
<view class="hourtime hourminute">{{minutes}}</view>
<view class="hourtime hoursecond">{{seconds}}</view>
</view>
<view class="anniu" bindtap="startchou">
<image src="/images/anniu.png"></image>
</view>
<!-- 叉号 -->
<!-- <view class="chahao">
<image src="/images/chahao.png"></image>
</view> -->
</view>
\ No newline at end of file
... ...
page{
width:100%;
height:100vh
}
.remaincishu{
color:#FB5A44;
font-size: 32rpx;
font-weight: bold;
position: absolute;
top:476rpx;
left:228rpx;
letter-spacing: 2rpx;
}
.chouimg{
width:100%;
/* height:100vh; */
position: relative;
/* background:url('https://binhai.w.broing.cn/image/b22ca3fa145158a572f9bf6953bfaab.png')no-repeat center;
background-size:100% 100%; */
}
image{
width:100%;
height:100%;
}
.box{ width: 566rpx; height:472rpx; margin: 0 auto; box-sizing: border-box; position: relative;
}
.pagebox{
position: absolute;
top:599rpx;
left:92rpx;
}
.list{ width: 185rpx; height: 153rpx; position: absolute; background-color: transparent;
display: flex; flex-direction: column; flex-wrap: wrap; justify-content: center; align-content: center; align-items: center;
border-radius: 20rpx;
display:flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
/* 抽奖过程中选定样式 */
.list.change_in{ color: #fff; background-color: #3D9AF9;}
.list_t{ width: 89rpx; height: 96rpx;}
.list_t image{ width: 100%; height: 100%;}
.list_b{ width: 90%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
color:#DA321B;
font-size: 20rpx;
font-weight: bold;
}
/* 根据TOP */
.list:nth-child(1){ left: 50%; top: 50%; color: #fff; background-color: #1CBBB4;
display: flex; justify-content: center; align-content: center; align-items: center;
-webkit-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.list.grey:nth-child(1){ background-color: #5F9EA0;}
.list:nth-child(2) , .list:nth-child(3) , .list:nth-child(4){ top: 0;}
.list:nth-child(6) , .list:nth-child(7) , .list:nth-child(8){ bottom: 0;}
.list:nth-child(5) , .list:nth-child(9){ top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
/* 根据LEFT */
.list:nth-child(2) , .list:nth-child(8) , .list:nth-child(9){ left: 0;}
.list:nth-child(3) , .list:nth-child(7){ left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}
.list:nth-child(4) , .list:nth-child(5) , .list:nth-child(6){ right: 0;}
/* 中奖名单 */
.zhongtitle{
display:flex;
align-items: center;
justify-content: center;
}
.zhongleft{
color:#FB5A44;
font-size: 32rpx;
font-weight: bold;
}
.zhongright{
color:#333;
font-size: 32rpx;
font-weight: bold;
}
.zhonglist{
position: absolute;
bottom:52rpx;
left:52rpx;
width:640rpx;
}
.zhongboxitem{
display:flex;
align-items: center;
justify-content: space-around;
margin-bottom:12rpx
}
.zhongtou{
width:52rpx;
height:52rpx;
font-size: 0;
border-radius: 50%;
margin-right:22rpx;
}
.zhongtou image{
width:100%;
height:100%;
border-radius: 50%;
}
.zhongname{
/* width:173rpx; */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color:#333;
font-size: 24rpx;
}
.zhongmiddle{
color:#FB5A44;
font-size: 24rpx;
}
.zhongrightk{
color:#333;
font-size: 24rpx;
}
.zhongbox{
padding: 20rpx;
box-sizing: border-box;
border: 4rpx solid #FB5A44;
border-radius: 20rpx;
margin-top: 20rpx;
height:300rpx;
overflow-y: scroll;
}
.prise{
width:640rpx;
display:flex;
align-items: center;
justify-content: space-between;
position: absolute;
bottom:-23rpx;
left:52rpx;
}
.priseleft{
width:72rpx;
height:72rpx;
background:#FD3217;
border-radius: 50%;
display:flex;
align-items: center;
justify-content: center;
}
.priseleft image{
width:38rpx;
height:38rpx;
}
.jilu{
display:flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.priseright{
width:72rpx;
height:72rpx;
background:#3D9AF9;
border-radius: 50%;
display:flex;
align-items: center;
justify-content: center;
}
.priseright image{
width:38rpx;
height:38rpx;
}
.zhongjilu{
color:#FD3217;
font-size: 28rpx;
}
.huodongrule{
color:#3D9AF9;
font-size: 28rpx;
}
.daowrap{
width:100%;
height:100%;
position: relative;
z-index:-2;
}
.daojitime{
display:flex;
align-items: center;
z-index: 999;
color:#fff;
font-size: 40rpx;
}
.hourday{
position: absolute;
top:415rpx;
left:172rpx;
}
.hourhour{
position: absolute;
top:415rpx;
left:285rpx;
}
.hourminute{
position: absolute;
top:415rpx;
left:394rpx;
}
.hoursecond{
position: absolute;
top:415rpx;
left:509rpx;
}
.anniu{
width:305rpx;
height:121rpx;
font-size: 0;
position: absolute;
bottom:306rpx;
left:235rpx;
}
.chahao{
width:78rpx;
height:78rpx;
font-size: 0;
position: absolute;
bottom:120rpx;
left:340rpx;
}
\ No newline at end of file
... ...
... ... @@ -13,7 +13,7 @@
<view class='left'>
<view class='left_item {{status == index?"active":""}}' id='Nav{{index}}' wx:for='{{nav_arr}}' wx:key='index' bindtap='{{item.id!=""?"click_category":"seltaocan"}}' data-index='{{index}}' data-id='{{item.id}}'>{{item.name}}</view>
<!-- <view class='left_item {{taocan == true?"active":""}}' bindtap="seltaocan">套餐专区</view> -->
<view class='left_item {{taocan == true?"active":""}}' wx:if="{{taocanlist.length>0}}" bindtap="seltaocan">套餐专区</view>
</view>
... ...
... ... @@ -20,7 +20,7 @@ Page({
paynum: 'paynum desc', //销量排序方式
stick: 0,
activity: [],
xianshilist: [],
xianshilist: [{}],
day: '',
hou: '',
min: '',
... ...
... ... @@ -152,7 +152,12 @@ Page({
wx.navigateTo({
url: '/packageA/pages/zuji/zuji',
})
}else if(index==7){
wx.navigateTo({
url: '/packageA/pages/choujiang/choujiang',
})
}
} else if (wx.getStorageSync("token") && index == 5) {
// 跳转关于列表
wx.navigateTo({
... ...
... ... @@ -130,6 +130,12 @@
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
<view class="item" bindtap="jumpListFun" data-t="7">
<view class="left">
<image src="/images/choujiang.png" style="width:30rpx;height:30rpx;" />转盘抽奖
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
</view>
</view>
<concat />
... ...
// pages/message/message.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
page: 1,
listzhong: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
getmessagelist() {
let that = this
let url = '/gift/get_gift_log2';
let data = {
page:that.data.page,
pageNum:10
}
app.post(url, data, "POST").then((r) => {
console.log(r)
that.setData({
listzhong:that.data.listzhong.concat(r.msg)
})
console.log('34893489',that.data.listzhong)
}).catch((err) => {})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.getmessagelist()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
let newpage = this.data.page;
newpage++;
this.setData({
page: newpage
})
this.getmessagelist()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "中奖记录"
}
\ No newline at end of file
... ...
<view class="empty" wx:if="{{listzhong.length==0}}">暂无更多数据</view>
<view class="zhongbox" wx:else>
<view class="zhongboxitem" wx:for="{{listzhong}}" wx:key="">
<view class="zhongboxleft flexone">
<view class="zhongtou">
<image src="{{item.image}}"></image>
</view>
<view class="zhongname">{{item.user_name}}</view>
</view>
<view class="zhongmiddle">{{item.name}}</view>
<view class="zhongrightk">{{item.tel}}</view>
</view>
</view>
... ...
page {
background: #f9f9f9;
}
.messagelist {
width: 686rpx;
border-radius: 20rpx;
background: #fff;
margin: 20rpx auto 0;
}
.mssageitem {
padding: 32rpx 32rpx;
box-sizing: border-box;
border-radius: 10rpx;
border-bottom: 1rpx solid #f5f5f5;
}
.messtopleft {
color: rgba(19, 26, 46, 1);
font-size: 28rpx;
}
.activeleft {
position: relative;
}
.messtopleft:before {
display: block;
content: '';
position: absolute;
left:-15rpx;
top:50%;
width:10rpx;
height:10rpx;
border-radius: 50%;
background: #FF0000;
transform: translateY(-50%)
}
.messtopright, .messagename {
color: #939a9e;
font-size: 28rpx;
}
.messagename {
margin-top: 10rpx;
word-break:break-all
}
.no_login{
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 400;
color: #ccc;
margin-top: 200rpx;
text-align: center;
}
/* 中奖名单 */
.zhongtitle{
display:flex;
align-items: center;
justify-content: center;
}
.zhongleft{
color:#FB5A44;
font-size: 32rpx;
font-weight: bold;
}
.zhongright{
color:#333;
font-size: 32rpx;
font-weight: bold;
}
.zhonglist{
position: absolute;
bottom:52rpx;
left:52rpx;
width:640rpx;
}
.zhongboxitem{
display:flex;
align-items: center;
justify-content: space-between;
margin-bottom:21rpx
}
.zhongtou{
width:52rpx;
height:52rpx;
font-size: 0;
border-radius: 50%;
margin-right:22rpx;
}
.zhongtou image{
width:100%;
height:100%;
border-radius: 50%;
}
.zhongname{
/* width:173rpx; */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color:#333;
font-size: 24rpx;
}
.zhongmiddle{
color:#FB5A44;
font-size: 24rpx;
}
.zhongrightk{
color:#333;
font-size: 24rpx;
}
.zhongbox{
padding: 20rpx;
box-sizing: border-box;
border-radius: 20rpx;
margin-top: 20rpx;
}
.prise{
width:640rpx;
display:flex;
align-items: center;
justify-content: space-between;
position: absolute;
bottom:-23rpx;
left:52rpx;
}
.priseleft{
width:72rpx;
height:72rpx;
background:#FD3217;
border-radius: 50%;
display:flex;
align-items: center;
justify-content: center;
}
.priseleft image{
width:38rpx;
height:38rpx;
}
.jilu{
display:flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.priseright{
width:72rpx;
height:72rpx;
background:#3D9AF9;
border-radius: 50%;
display:flex;
align-items: center;
justify-content: center;
}
.priseright image{
width:38rpx;
height:38rpx;
}
.zhongjilu{
color:#FD3217;
font-size: 28rpx;
}
.huodongrule{
color:#3D9AF9;
font-size: 28rpx;
}
\ No newline at end of file
... ...
// pages/rule/rule.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
content:''
},
// 获取信息
getinfo(){
let that=this;
let url ='/gift/get_setting'
let params = {
}
app.post(url, params).then((res) => {
console.log(res,373784478)
that.setData({
content:res.msg.content
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getinfo()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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
... ...
<view class="contentbox">
<rich-text nodes="{{content}}"></rich-text>
</view>
... ...
.contentbox{
padding: 32rpx;
box-sizing: border-box;
}
\ No newline at end of file
... ...
... ... @@ -11,6 +11,7 @@ Page({
status: 0,
nav: ['商品介绍', '规格参数', '售后保障'],
mask: false,
buyStatus: 0,
taocanlist:[]
},
num_change(e) {
... ... @@ -44,7 +45,7 @@ Page({
look_more(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/shop_detail/shop_detail?id=' + id
url: '/packageA/pages/shop_detail/shop_detail?id=' + id
})
},
//添加购物车
... ... @@ -74,13 +75,13 @@ Page({
num: that.data.num
}
wx.navigateTo({
url: '/pages/taocanpay/taocanpay?' + '&info=' + JSON.stringify(info) + '&id=' + that.data.info.id
url: '/packageA/pages/taocanpay/taocanpay?' + '&info=' + JSON.stringify(info) + '&id=' + that.data.info.id
})
},
//去查看购物车
go_car() {
wx.switchTab({
url: '/pages/shop_cart/shop_cart'
url: '/packageA/pages/shop_cart/shop_cart'
})
},
//收藏
... ... @@ -115,9 +116,9 @@ Page({
},
change_cover(e) {
if( app.globalData.status==0){
if( this.data.buyStatus==0){
wx.showToast({
title: '您已您所在单位暂未开始劳保购买!',
title: '您已您所在单位暂未开购买!',
icon:'none'
})
return false
... ... @@ -143,7 +144,8 @@ Page({
app.post(url, params).then((res) => {
this.setData({
info: res.msg.data,
taocanlist:res.msg.product
taocanlist:res.msg.product,
buyStatus: res.msg.data.status
})
WxParse.wxParse('contenta', 'html', res.msg.maincontent, this, 5)
WxParse.wxParse('contenb', 'html', res.msg.guigecontent, this, 5)
... ...
... ... @@ -83,7 +83,7 @@ Page({
// 去添加地址
add_address() {
wx.navigateTo({
url: '/pages/address/address',
url: '/packageA/pages/address/address',
})
},
... ...
... ... @@ -89,7 +89,7 @@ Page({
})
}else{
wx.navigateTo({
url: '/pages/taocandetail/taocandetail?id=' + id
url: '/packageA/pages/taocandetail/taocandetail?id=' + id
})
}
... ...
... ... @@ -34,6 +34,7 @@ Page({
pid: '',
logok: '',
selected: 0,
tel:'',
list: [{
pagePath: "/pages/index/index",
text: "商品",
... ... @@ -79,6 +80,8 @@ Page({
seltui: index
})
},
// 关于我们
// 进入商品列表
cityTap(e) {
console.log(e)
... ... @@ -339,13 +342,12 @@ Page({
// 获取活动专区
this.getzhuanqulist();
this.getxianshi();
// this.getxianshi();
setTimeout(function () {
that.setData({
showtime: true
})
}, 990)
this.getpinpailist()
}
//控制显示隐藏
... ... @@ -353,9 +355,13 @@ Page({
// 我写的项目
},
onReady(){
this.setData({
tel: wx.getStorageSync('tel')
})
console.log(this.data.tel)
},
// 获取一级分类
getonkind() {
let that = this;
... ... @@ -462,7 +468,7 @@ Page({
// 控制活动专区和限时抢购显示隐藏
ishow() {
let that = this
let url = '//wb/wb';
let url = '/wb/wb';
let data = {
}
... ... @@ -471,9 +477,10 @@ Page({
that.setData({
status1: r.msg.status1,
status2: r.msg.status2,
title2: r.msg.title2
title2: r.msg.title2,
tel:r.msg.tel
})
wx.setStorageSync('tel', r.msg.tel)
}).catch((err) => { })
... ...
... ... @@ -238,7 +238,7 @@
<view wx:else class="noData">暂无相关产品</view>
</view>
<concat />
<concat :tel='{{tel}}'></concat>
</view>
</view>
... ...
... ... @@ -20,7 +20,7 @@
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"compileHotReLoad": true,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
... ... @@ -30,7 +30,6 @@
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
... ... @@ -39,10 +38,11 @@
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false
"useCompilerPlugins": false,
"ignoreUploadUnusedFiles": true
},
"compileType": "miniprogram",
"libVersion": "2.19.6",
"libVersion": "2.22.0",
"appid": "wx73497072e7340d61",
"projectname": "binhaineigouopen",
"debugOptions": {
... ...