作者 刘朕

更新

不能预览此文件类型
... ... @@ -29,6 +29,7 @@
"pages/logistics/logistics",
"pages/notice/notice",
"pages/outerChain/outerChain",
"pages/outerChain2/outerChain2",
"pages/zhuanqu/zhuanqu",
"pages/taocandetail/taocandetail",
"pages/taocanpay/taocanpay",
... ...
... ... @@ -620,6 +620,18 @@ Page({
wx.hideLoading()
})
},
//跳转梓云轩小程序
ziyunxuan(){
wx.navigateToMiniProgram({
appId: 'wxb17ce7aff09d1adf',
path: 'pages/tab-container-page/tab-container-page',
envVersion: 'release',
success(res) {
// 打开成功
console.log(123);
}
})
},
//获取商品列表
good_list(pid, c_index) {
wx.showLoading({
... ...
... ... @@ -34,7 +34,7 @@
<view class="lunbo_box {{nav_index==0?'boxactive':''}}" >
<swiper interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" current='{{current}}' bindchange='swiperChange' autoplay="{{autoplay}}" class='swiper_box'>
<swiper-item class='swiper-item' wx:for="{{imgurl}}" wx:key="index">
<image src='{{item.image}}' mode="aspectFill" data-id="{{item.thing_id}}" data-style="{{item.style}}" data-src="{{item.thing_id}}" catchtap="{{item.thing_id == 0?'':'look_more'}}" />
<image src='{{item.image}}' mode="aspectFill" data-id="{{item.thing_id}}" data-style="{{item.style}}" data-src="{{item.thing_id}}" catchtap="{{item.thing_id == 0?'ziyunxuan':'ziyunxuan'}}" />
</swiper-item>
</swiper>
<view class="dots">
... ...
... ... @@ -25,7 +25,8 @@ Page({
name: ''
}
}
},
isSubmitting: false // 控制按钮的提交状态
},
//加减商品数量
num_change(e) {
... ... @@ -242,6 +243,9 @@ Page({
let list = that.data.info.products
let coudan = that.data.coudan
let info = []
// 检查是否已经提交中,防止多次点击
if (that.data.isSubmitting) return;
that.setData({ isSubmitting: true }); // 设置为提交中
if (that.data.type == 4) {
for (let obj of list) {
info.push({
... ... @@ -281,7 +285,23 @@ Page({
order_odd: order_odd
}
app.post(url, params).then((res) => {
that.payment(res.msg)
console.log('resres',res);
// that.payment(res.msg)
if (res.msg.message == "支付成功") {
// wx.showToast({
// title: '购买成功',
// icon:'none'
// })
this.setData({
success: true,
isSubmitting: false
})
} else if (res.msg.message == "余额不足") {
this.setData({
fail: true,
isSubmitting: false
})
}
})
},
payment(res) {
... ...
... ... @@ -133,6 +133,39 @@ Page({
url: '../notice/notice?notice_id=' + id,
})
},
//跳转梓云轩小程序
ziyunxuan(){
wx.navigateToMiniProgram({
appId: 'wxb17ce7aff09d1adf',
path: 'pages/tab-container-page/tab-container-page',
envVersion: 'release',
success(res) {
// 打开成功
console.log(123);
}
})
},
//跳转安鑫h5
anxin(){
let url = "https://store.800890.com/mobile/pages/index/index?channel=2c90808b93517ae101938aabcad9125b";
console.log(encodeURIComponent(url));
wx.navigateTo({
url: '/pages/outerChain2/outerChain2?src=' + encodeURIComponent(url)
})
},
shengri(){
let url = "https://store.800890.com/mobile/pages/index/index?channel=402881c19369440901938aa974f80de5";
wx.navigateTo({
url: '/pages/outerChain2/outerChain2?src=' + encodeURIComponent(url)
})
},
zaixian(){
let url = "https://store.800890.com/mobile/pages/index/index?channel=402881c19369440901938aa7333b0de1";
wx.navigateTo({
url: '/pages/outerChain2/outerChain2?src=' + encodeURIComponent(url)
})
},
// 进入劳保商城
laobao() {
... ...
... ... @@ -42,7 +42,7 @@
current='{{current}}' bindchange='swiperChange' autoplay="{{autoplay}}" class='swiper_box'>
<swiper-item class='swiper-item' wx:for="{{imgurl}}" wx:key="index">
<image src='{{item.image}}' mode="aspectFill" data-id="{{item.goods_id}}"
data-style="{{item.type}}" data-src="{{item.url}}" catchtap="look_more" />
data-style="{{item.type}}" data-src="{{item.url}}" catchtap="ziyunxuan" />
</swiper-item>
</swiper>
<view class="dots">
... ... @@ -79,8 +79,11 @@
<view class="fenleiitem" bindtap="gonghui">
<image src="/images/img_laobao2.png" mode="widthFix"></image>
</view>
<view class="fenleiitem" bindtap="canban">
<!-- <view class="fenleiitem" bindtap="canban">
<image src="/images/img_laobao-1@2x.png" mode="widthFix"></image>
</view> -->
<view class="fenleiitem" bindtap="anxin">
<image src="/images/holiday.png" mode="widthFix"></image>
</view>
<view class="fenleiitem" bindtap="birthday" id="1">
<image src="/images/img_laobao3@2x.png" mode="widthFix"></image>
... ... @@ -89,8 +92,28 @@
<image src="/images/img_laobao4.png" mode="widthFix"></image>
</view> -->
</view>
<view class="fenlei2">
<view class="fenleiitem" bindtap="shengri">
<image src="/images/birthday.png" mode="widthFix"></image>
</view>
<view class="fenleiitem" bindtap="zaixian">
<image src="/images/movie.png" mode="widthFix"></image>
</view>
<view class="fenleiitem">
<image src="/images/elecshop.png" mode="widthFix"></image>
</view>
<view class="fenleiitem">
<image src="/images/sportshop.png" mode="widthFix"></image>
</view>
<!-- <view class="fenleiitem" bindtap="birthday" id="2">
<image src="/images/img_laobao4.png" mode="widthFix"></image>
</view> -->
</view>
<!-- <view class="huo" bindtap="ziyunxuan">
<image src="https://binhaidispark.w.broing.cn/assets/img/Group%202@2x.png" style="height: 262rpx;"></image>
</view> -->
<!-- 新品上线 -->
<view class="huo">
<!-- <view class="huo">
<image src="/images/huo.png" class="huoimg"></image>
<view class="pingtai">轻奢各样商品钜惠来袭</view>
</view>
... ... @@ -146,12 +169,12 @@
</view>
</view>
</view>
</view>
</view> -->
<!-- 活动区域 -->
<view class="actboxpage" wx:if="{{nav_index==0}}">
<!-- <view class="actboxpage" wx:if="{{nav_index==0}}"> -->
<!-- <view class="pinpainame">品牌专区</view> -->
<view class="pinpaiheng">
<!-- <view class="pinpaiheng">
<view class="huok">
<image src="/images/zuanshi.png" class="huoimg"></image>
<view class="pinname">品牌专区</view>
... ... @@ -162,9 +185,9 @@
<image src="/images/gosee.png" class="seeimg"></image>
</view>
</view>
<view class="actity" wx:if="{{status1==1}}">
<view class="actity" wx:if="{{status1==1}}"> -->
<!-- <view class="miaoshaoname">活动专区</view> -->
<view class="active flexone">
<!-- <view class="active flexone">
<view wx:for="{{pinpailist}}" class="actbox" wx:key="" bindtap="cityTap" data-id="{{item.id}}">
<view class="activeitem">
<image src="{{item.image}}" mode="widthFix"></image>
... ... @@ -172,13 +195,13 @@
<view class="activename">{{item.name}}</view>
</view>
</view>
</view>
</view> -->
<!-- <view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}" bindtap="moremiao">
<view class="neigouimg">
<image src="{{logok}}"></image>
</view>
</view> -->
</view>
<!-- </view> -->
<!-- 公告栏 -->
<!-- url="../notice/notice" -->
... ...
... ... @@ -362,6 +362,13 @@ image {
padding:21rpx 32rpx;
box-sizing: border-box;
}
.fenlei2 {
display: flex;
align-items: center;
justify-content: space-between;
padding:0rpx 32rpx 21rpx;
box-sizing: border-box;
}
.fenleiitem {
flex:1;
... ...
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
src: decodeURIComponent(options.src)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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
... ...
<web-view src="{{src}}"/>
... ...
/* pages/outerChain2/outerChain2.wxss */
\ No newline at end of file
... ...