Commit d0a51525 authored by xieyishang's avatar xieyishang

addxx

parent 337fea33
{
"pages": [
"pages/index/index",
"pages/index/switchcity/switchcity",
"pages/user/user",
"pages/pay/pay",
"pages/webview/webview",
"pages/lmping/user/user",
"pages/lmping/home/home",
"pages/lmping/hometwo/hometwo",
"pages/lmping/signin/signin",
"pages/lmping/order/order",
"pages/lmping/user/user",
"pages/lmping/myfans/myfans",
"pages/lmping/pushcard/pushcard",
"pages/lmping/lmvallog/lmvallog",
"pages/lmping/profitlog/profitlog",
"pages/lmping/rechargelog/rechargelog",
"pages/lmping/activitydescri/activitydescri"
"pages/lmping/activitydescri/activitydescri",
"pages/pay/pay",
"pages/webview/webview"
],
"subpackages": [
{
......@@ -26,30 +23,6 @@
"shops/weidian/ping_details/ping_details"
]
},
{
"root": "pages/personal/",
"pages": [
"withdraw/withdraw",
"withdraw/withdraw_record/withdraw_record",
"withdraw/withdrawal_success/withdrawal_success",
"withdraw/bankCard_list/bankCard_list",
"withdraw/bankCard/bankCard",
"lumainfo/lumainfo",
"lumainfo/lumaintroduce/lumaintroduce",
"lumainfo/certificate/certificate",
"coupons/coupons",
"set/set",
"set/new_address/new_address",
"set/payment_code/payment_code",
"set/address_list/address_list",
"express/express",
"agreementuser/agreementuser",
"agreement/agreement"
]
}
],
"window": {
......@@ -63,12 +36,7 @@
"borderStyle": "white",
"backgroundColor": "#fafafa",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "/images/newtabbar/tab1_0.png",
"selectedIconPath": "/images/newtabbar/tab1_1.png"
},
{
"pagePath": "pages/lmping/home/home",
"text": "拼团",
......@@ -76,7 +44,7 @@
"selectedIconPath": "/images/newtabbar/a1.png"
},
{
"pagePath": "pages/user/user",
"pagePath": "pages/lmping/user/user",
"text": "我的",
"iconPath": "/images/newtabbar/tab3_0.png",
"selectedIconPath": "/images/newtabbar/tab3_1.png"
......
// pages/advices/advices.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
<!--pages/advices/advices.wxml-->
<scroll-view scroll-x="true" class="nav {{showScroll ? 'showScroll' : ''}} " scroll-left="{{navScrollLeft}}" scroll-with-animation="{{true}}" scroll-into-view="{{toView}}" bindscrolltoupper="stopTimer" bindscroll="stopNewTimer">
<block wx:for="{{guige}}" wx:for-index="idx" wx:for-item="navItem" wx:key="idx">
<view id="navItem{{idx}}" class="nav-item navItem{{idx}} {{currentTab == idx ?'active':''}}" data-current="{{idx}}" data-id="{{guige.id}}" data-url="{{guige.cat_url}}" data-name="{{guige.name}}" bindtap="switchNav" style="margin-right:{{idx==navData.length-1?'60rpx':'0rpx'}};">
{{item.name}}
<image class='hot' src='../../static/images/icon/icon_hot.png' wx:if="{{navItem.is_recommend == 1}}"></image>
</view>
</block>
<view class='slideLine' style="width:{{slideWidth}}px;left:{{sliedeLeft}}px;"></view>
</scroll-view>
\ No newline at end of file
/* pages/advices/advices.wxss */
/* 顶部导航条 */
.nav {
height: 100rpx;
width: 630rpx;
position: relative;
box-sizing: border-box;
overflow: hidden;
font-size: 0;
line-height: 100rpx;
white-space: nowrap;
opacity: 0;
transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
}
.nav.showScroll {
opacity: 1;
}
.slideLine {
height: 8rpx;
/* width: 24px; */
position: absolute;
top: 94rpx;
/* top: 0; */
background: #e64340;
transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
}
.nav-item {
/* padding: 0 5px; */
margin: 0 5px;
position: relative;
display: inline;
/* height: 100rpx; */
text-align: center;
font-size: 14px;
color: #666;
border-bottom: none;
/* background: green; */
transition: all 500ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
}
.nav-item .hot{
width: 19rpx;
height: 19rpx;
position: absolute;
right: -5rpx;
top: -5rpx;
}
.nav-item.active {
color: #e64340;
/* height: 94rpx; *//* border-bottom: 8rpx solid #e64340; */
}
.page-top {
width: 100%;
position: relative;
background: white;
}
.page-top.top {
position: fixed;
top: 0;
left: 0;
z-index: 99999;
}
.search {
position: absolute;
right: 30rpx;
top: 20rpx;
width: 60rpx;
height: 60rpx;
z-index: 999999;
}
.mask-scroll {
position: absolute;
right: 120rpx;
top: 0;
width: 45rpx;
height: 100rpx;
z-index: 999999;
}
\ No newline at end of file
import { getAdvices } from '../../api/advicesCenter.js';
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
demomsg:`<span>江西多思盈信息科技有限公司希望你们成为他的员工,点击链接同意:</span><a href="https://mp.weixin.qq.com/s/VK0a4aPM3a-FGOpUa0jkRg">查看详情</a>`,
active:0,//选中项
page:0,//页数
advices:[],//消息列表
isallshow:false,//是否加载完毕
is_read:0,//是否显示未读红点 0不显示 1显示
hidden:false,
isloading:false,
},
onLoad(){
},
/*
切换选项
*/
tabel(e){
if(this.data.isloading){
console.info("点的太快了");
return false;
}
this.setData({
active:e.currentTarget.dataset.active,
page:0,
advices:[],
isallshow:false,
isloading:true,
});
wx.pageScrollTo({
scrollTop: 0,
duration: 300
});
this.getAdvicesFun();
},
/*
消息数据请求
*/
getAdvicesFun(){
wx.showLoading({ title: '加载中...' });
let page=this.data.page;
page++;
getAdvices({
page:page,
source:this.data.active==0?0:1,//0 个人 1系统
type:this.data.is_read,//0未读 1已读
}).then(res=>{
// console.log(res);
this.setData({
isloading:false,
})
wx.hideLoading();
if(res.code==0){
if(this.data.active==0){ //个人消息
if(res.data.advices.length!=0){
this.setData({
advices:[...this.data.advices,...res.data.advices]
})
}else{
this.setData({ isallshow:true });
}
}else{ //系统消息
if(res.data.platformAdvices.length!=0){
this.setData({
advices:[...this.data.advices,...res.data.platformAdvices]
})
}else{
this.setData({ isallshow:true });
}
}
this.setData({
is_read:res.data.is_read,
page,
})
}else{
wx.showToast({
title: res.msg,
icon:'none'
})
}
}).catch(()=>{
this.setData({
isloading:false,
})
wx.hideLoading();
})
},
setUserInfo(e) { //点击了授权
if (e.detail) {
this.setData({
hidden: false,
});
this.getAdvicesFun();
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.setData({
page:0,
is_read:0,
advices:[],
isallshow:false,//是否加载完毕
})
if(!wx.getStorageSync('userInfo')){
this.setData({
hidden:true,
});
return;
}
this.setData({
hidden:false,
});
this.getAdvicesFun();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide(){
this.setData({ hidden:false });
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
if(!this.isallshow){
this.getAdvicesFun();
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {
"mp-html":"/components/mphtml/index"
},
"navigationBarTitleText": "消息中心"
}
\ No newline at end of file
<view>
<view class="ali-c h90 tabel bgf posf w1005" style="top:0;">
<view class="flex1" catchtap='tabel' data-active="0">
<view class="tc lh90 mgat {{active==0?'active':''}}" style="width: 150rpx;">个人消息</view>
</view>
<view class="flex1 " catchtap='tabel' data-active="1" style="border-left: 1px solid #f5f7f6;">
<view class="tc lh90 mgat posr {{active==1?'active':''}}" style="width: 150rpx;">
平台消息
<view wx:if="{{is_read==1}}" class="bgF64 posa"
style="right:-12rpx;top:40rpx;border-radius: 50%;width: 15rpx;height: 15rpx;"></view>
</view>
</view>
</view>
<view class="mt-100">
<!-- 个人消息 -->
<view style="padding: 24rpx;" wx:if="{{active==0}}">
<view class="mb-40" wx:for="{{advices}}" wx:key="index">
<view class="s28 c83 tc">{{item.day}} {{item.time}}</view>
<view class="mt-25 bgf br10" style="padding: 24rpx;">
<view class="32 fwb">{{item.title}}</view>
<view wx:if="{{item.msg_text}}" class="s30 mt-20" style="color: #363535;text-align: justify;">
<!-- {{item.msg_text.content}} -->
<mp-html content="{{item.msg_text.content}}" />
</view>
</view>
</view>
</view>
<!-- 系统消息 -->
<view style="padding: 24rpx;" wx:if="{{active==1}}">
<view class="mb-40" wx:for="{{advices}}" wx:key="index">
<view class="s28 c83 tc">{{item.day}} {{item.time}}</view>
<view class="mt-25 bgf br10" style="padding: 24rpx;">
<view class="32 fwb">{{item.title}}</view>
<view class="s30 mt-20" style="color: #363535;text-align: justify;">
<!-- {{item.intro}} -->
<!-- demomsg -->
<mp-html content="{{item.intro}}" />
</view>
</view>
</view>
</view>
<view class="tc c33" wx:if="{{advices.length==0}}">暂无消息</view>
<view class="tc c33 mb-20" wx:if="{{advices.length!=0&&isallshow}}"> ~我也是有底线的~ </view>
</view>
</view>
<!-- 登陆授权弹窗 -->
<login hidden="{{hidden}}" bind:setUserInfo="setUserInfo" />
\ No newline at end of file
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
display: none;
}
page{
background: #f5f7f6;
padding-bottom: 0rpx !important;
}
.c83{
color: #838383;
}
.active{
color: #F64F15;
border-bottom: 4rpx solid #F64F15;
background: none ;
}
.tabel{
border-top: 1px solid #f5f7f6;
border-bottom: 1px solid #f5f7f6;
}
.bgF64{
background: #F64F15;
}
\ No newline at end of file
/**index.wxss**/
page{
background: rgba(245, 242, 242, 1);
position: relative;
}
.indexbox{
background:linear-gradient(180deg,rgba(255,16,16,1),rgba(255,16,16,1),rgba(255,16,16,1),#f64f15,rgba(245, 242, 242, .8),rgba(245, 242, 242, .8),rgba(245, 242, 242, 1),rgba(245, 242, 242, 1));
}
.toububox{
width: 100%;
position: fixed;
top: 0;
padding:0 24rpx 15rpx 24rpx;
box-sizing: border-box;
background: #FF1010;
z-index: 998;
}
.yingyongimg{
width:50rpx;
height:50rpx;
}
.wizhiimg{
width:24rpx;
height:32rpx;
}
.xiangxiaimg{
width:18rpx;
height:10rpx;
}
.sousuoimg{
width:27rpx;
height:27rpx;
}
.ewmimg{
width:48rpx;
height:48rpx;
}
.tzhiimg{
width:34rpx;
height:34rpx;
}
.show{
display: block;
}
.hidden{
display: none;
}
.tubiaoimg{
width:84rpx;
height:84rpx;
margin-bottom: 20rpx;
}
.zhaomuimg{
background-size: 100% 100%;
}
.ljteimg{
width:106rpx;
height:24rpx;
position: absolute;
bottom: 17%;
left: 46%;
-webkit-animation-name: scaleDrawss; /*关键帧名称*/
-webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
-webkit-animation-iteration-count: infinite; /*动画播放的次数*/
-webkit-animation-duration: 1.3s; /*动画所花费的时间*/
}
@keyframes scaleDrawss { /*定义关键帧、scaleDrew是需要绑定到选择器的关键帧名称*/
0%{
transform: scale(1); /*开始为原始大小*/
}
25%{
transform: scale(1.5); /*放大1.1倍*/
}
50%{
transform: scale(1);
}
75%{
transform: scale(1.5);
}
}
.inputbox{
height: 55rpx;
padding: 0 20rpx;
box-sizing: border-box;
display: flex;
align-items: center;
flex: 1;
background:rgba(255,255,255,1);
border-radius:5rpx;
}
.input_zi{
flex: 1;
}
.in_pl{
font-size:24rpx;
font-weight:500;
color:rgba(107,107,107,1);
}
/* 轮播 */
.banner_swiper {
width: 100%;
height: 240rpx;
}
.le-img {
width: 100%;
height: 230rpx;
display: block;
transform: scale(0.8);
transition: all 0.3s ease;
border-radius: 6px;
}
.le-img.le-active {
width: 100%;
transform: scale(1);
}
/* 向上滚动 */
.laba{
width: 31rpx;
height: 28rpx;
display: inline-block;
margin-left:10rpx;
}
.swiper_container {
height: 55rpx;
flex: 1;
margin-left: 20rpx;
line-height: 55rpx;
}
.swiper_item {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
letter-spacing: 2px;
font-family: PingFang-SC-Regular;
font-size: 28rpx;
color: #fff;
}
/* 招募 */
.box_zm_10 {
width: 100%;
border-radius: 10rpx;
padding: 1rpx 20rpx;
box-sizing: border-box;
}
.ziti{
font-size:36rpx;
font-weight:400;
color:rgba(255,223,92,1);
}
.zmbox{
width: 49%;
padding: 0 20rpx;
box-sizing: border-box;
border-radius: 10rpx;
background: #fff;
}
.sjimg{
width:28rpx;
height:28rpx;
}
.rzimg{
width:82rpx;
height:82rpx;
}
.rz_btn{
width:146rpx;
height:40rpx;
background:rgba(255,105,0,1);
border-radius:20rpx;
text-align: center;
font-size: 24rpx;
color: #fff;
line-height: 40rpx;
}
/* 优选 */
.yximg{
width: 100%;
background-size: 100% 100%;
}
.ptyx-80{
width: 100%;
padding: 80rpx 10rpx 0 10rpx;
box-sizing: border-box;
}
.gifimg{
float: right;
width:96rpx;
height:96rpx;
-webkit-animation-name: scaleDraw; /*关键帧名称*/
-webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
-webkit-animation-iteration-count: infinite; /*动画播放的次数*/
-webkit-animation-duration: 1.3s; /*动画所花费的时间*/
}
@keyframes scaleDraw { /*定义关键帧、scaleDrew是需要绑定到选择器的关键帧名称*/
0%{
transform: scale(1); /*开始为原始大小*/
}
25%{
transform: scale(1.5); /*放大1.1倍*/
}
50%{
transform: scale(1);
}
75%{
transform: scale(1.5);
}
}
.yxbox{
width: 49%;
border-radius: 10rpx;
overflow: hidden;
background: #fff;
}
.yxboxs{
width: 32%;
border-radius: 10rpx;
overflow: hidden;
background: #fff;
}
.yximg_zi{
width:180rpx;
height:150rpx;
margin: 0 auto
}
.yximg_zi2{
width: 115rpx;
height: 115rpx;
margin: 0 auto;
}
.yxbt{
line-height: 50rpx;
text-align: center;
width:100%;
height:50rpx;
background:linear-gradient(96deg,rgba(255,105,0,1),rgba(249,63,53,1));
}
/* 召唤好友 */
.zhaohuanimg{
width: 100%;
height: 200rpx;
background-size: 100% 100%;
}
/* 为你甄选 */
.wnimg{
width:26rpx;
height:30rpx;
}
.sximg{
width:34rpx;
height:28rpx;
transition: All 0.4s ease;
-webkit-transition: All 0.4s ease;
}
.zxzibox{
width:49%;
background: #FFF3EA;
border-radius:10rpx;
}
.zxzibox_img{
width:100%;
height:177rpx;
}
.tisiimg{
width:188rpx;
height:50rpx;
left: 0;
bottom: 0;
font-size:30rpx;
font-weight:800;
color:rgba(255,255,255,1);
padding-left: 10rpx;
box-sizing: border-box;
line-height: 50rpx;
background-size: 100% 100%
}
/* 推荐商家 */
/* tap */
.diancan{
height: 80rpx;
line-height: 80rpx;
font-size:30rpx;
font-weight:500;
color:rgba(34,34,34,1);
text-align: center;
}
.diancans{
font-weight:500;
color: #f64f15;
}
/* 内容 */
.zi_img{
width:180rpx;
height:180rpx;
border-radius:10rpx;
}
.dada_bt{
width: 85rpx;
height: 30rpx;
text-align: center;
line-height: 30rpx;
color: #fff;
background: #f64f15;
font-size: 18rpx
}
.ts_ke{
padding: 0 5rpx;
box-sizing: border-box;
border: 1px solid #f64f15;
font-size: 20rpx;
font-weight: 500;
color: #f64f15;
margin-bottom: 5rpx;
}
.poar{
position: absolute;
top: 10rpx;
right: 0;
}
/* 免费专区 */
.mfbtn{
width:31.5%;
height:70rpx;
border:1px solid rgb(201, 199, 199);
border-radius:10rpx;
font-size:30rpx;
font-weight:500;
color:rgba(183,183,183,1);
text-align: center;
line-height: 70rpx;
}
.mfbtnss{
background:#f64f15;
border:1px solid #f64f15;
color: #fff;
}
.remenimg{
width:100%;
height:200rpx;
border-radius:10rpx;
}
.ziti_mf{
width:100%;
height:37rpx;
line-height: 37rpx;
background:rgba(34,34,34,.2);
padding: 0 15rpx;
text-align: center;
box-sizing: border-box;
font-size:26rpx;
font-weight:500;
color:rgba(255,255,255,1);
left: 0;
bottom: 0;
}
.min_zihx{
font-size:20rpx;
font-weight:400;
text-decoration:line-through;
color:rgba(153,153,153,1);
}
/* 弹窗 */
.modals-cancelss{position:absolute; z-index:1000; top:0; left: 0; right:0; bottom: 0; background-color: rgba(0,0,0,.5);}
.id-dialog-bodys{position: absolute;
z-index: 9997;
top: 65rpx;
left: 0;
right: 0;
padding: 24rpx;
border-radius: 10rpx ;
background-color: #fff;
box-sizing: border-box;
width: 100%;
margin: 0 auto;
}
/*动画前初始位置*/
.bottom-pos{-webkit-transform:translateY(0);transform:translateY(0);}
.id_yh_btn{
width:100%;
height:88rpx;
border-top: 2rpx solid rgba(229,229,229,1);
font-size:32rpx;
font-weight:500;
color:#121212;
text-align: center;
}
button{
background: none;
border: none;
border-radius: 0rpx;
}
button::after{
background: none;
border: none;
border-radius: 0rpx;
}
.id_text_top{
padding: 30rpx;
box-sizing: border-box;
font-size:32rpx;
font-weight:500;
color:#3f3e3ebe;
text-indent:2em;
}
/* 筛选 */
/* tap */
.tapsui{
width:100%;
height: auto;
}
.tapsui_z{
width:100%;
height: 80rpx;
line-height: 80rpx;
font-size:28rpx;
font-weight:500;
color:rgba(102,102,102,1);
text-align: center;
box-sizing: border-box;
}
.tapsui_zs{
box-sizing: border-box;
font-size:30rpx;
font-weight:bold;
color:#f64f15;
}
.duihaoimg{
width:30rpx;
height:30rpx;
}
/* 遮罩层 */
.mask{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
z-index: 9000;
opacity: 0.8;
}
/* 弹出层 */
.modalDlg{
width: 100%;
position: fixed;
top: 10vh;
left: 0;
right: 0;
z-index: 9999;
border-radius:5px;
display: flex;
flex-direction: column;
align-items: center;
}
.quxiaoimg{
width: 68rpx;
height: 68rpx;
position: absolute;
bottom: -100rpx;
left: 0;
right: 0;
margin: 0 auto;z-index: 999;
}
.nianhuojie{
width: 737rpx;
height: 605rpx;margin: 10vh auto 0;
}
.nianhuojiess{
width: 526rpx;
height: 727rpx;margin: 5vh auto 0;
}
const app = getApp();
var clientImgPath = app.globalData.clientImgPath;
var img_host = app.globalData.ImgPath;
var staticUrl = app.globalData.staticUrl;
//商城列表 外卖列表 首页数据 第一次进入显示优惠券弹窗 优惠券过期提醒
import {
getSelectShop,
getEleShop,
getIndexData,
saveSignTime,
couponRecord
} from '../../api/index.js';
import {
get_tap_and_pay
} from '../../api/shop.js'; //领取优惠券
import luma from '../../utils/luma.js';
import {
getLaunchBargain,
getIndexBargain,
} from '../../api/bargaining.js';
// 引入SDK核心类
var QQMapWX = require('../../utils/libs/qqmap-wx-jssdk.min.js');
var qqmapsdk = new QQMapWX({
key: 'KROBZ-N2ORJ-VYBFJ-F76TY-ASPMT-JFBFH'
});
import {
setsubscript
} from "../../utils/setsubscript";
Page({
/**
* 页面的初始数据
*/
data: {
clientImgPath: clientImgPath,
img_host: img_host,
staticUrl: staticUrl,
sH: 0,
isshowtop: false,
isbottbg: false, //处理顶部的背景
active: 0, //0 好店推荐 1 优选商城
scrollTop: 0,
dataArr: [], //首页全部数据
youxuanlisttow: [], //商城列表
shop_list: [], //外卖列表
timeData: {}, //倒计时 时分秒
myCity: '正在定位', //首页地址
current: 0, //轮播下标
classify: "/pages/classify/classify", //首页分类
put: "/pages/shop/hotel/hotel",
skill_list: { //秒杀产品的数据
top: {},
list: [],
},
city_id: '',
latitude: '', //28.688571, //经纬度
longitude: '', //115.922679,
page: 0, //29, //外卖页数
page2: 0, //18, //商城页数
isallshow: false, //外卖 是否触底了
isTheBottom: false, //商城 是否触底了
dialogShow: false,
sctcimg: false, //红包过期提醒
num: 0, //滚动时 调用红包过期接口 用于计数 只在第一次的时候请求
statusBarHeight:0, //顶部通知栏高度
hidel: false, //true 登陆了 false 没登陆
hidden: false, //是否显示登陆授权弹窗 跟上面一个状态不是一样的意思
randomNumber: 800, //砍价浏览随机数
BargainingList: [], //砍价商品列表
BargainHeight:0,//砍价高度
isshowBargain:false,
timeDatakj:{},//砍价的倒计时
bargaindata:[],//砍价的数据 新的
shareuid:"",
},
/*
跳转秒杀列表
*/
miaotap() {
wx.navigateTo({
url: `/pages/index/TakeAway/TakeAway?audit=1`
})
},
/*
优惠券过期提醒
*/
couponRecordFun() {
couponRecord({}).then(res => {
if (res.code == 0) {
this.setData({
sctcimg: true,
});
}
})
},
/*
点击轮播跳转
*/
onDetail(e) {
let url = e.currentTarget.dataset.url;
if(url.indexOf("gasstation")!=-1){
wx.setStorageSync('showkefu', 1)
wx.switchTab({
url: '/pages/user/user',
})
return false;
}
if (url.indexOf("https://") != -1) { //只能走https
//使用webview
//https://mp.weixin.qq.com/s/VK0a4aPM3a-FGOpUa0jkRg
wx.navigateTo({
url: `/pages/webview/webview?url=${url}`
})
} else {
wx.navigateTo({
url: e.currentTarget.dataset.url
})
}
},
/*
首页菜单跳转
*/
jumpMenu(e) {
if (e.currentTarget.dataset.catid == 0) {
wx.navigateTo({
url: "/pages/shop/hotel/hotel"
})
} else if (e.currentTarget.dataset.catid == 56) {
wx.navigateTo({
url: "/pages/convenience_store/convenience_store"
})
} else {
luma.jumppages(e);
}
// luma.jumppages(e);
},
/*
轮播切换事件
*/
bindchange(e) {
this.setData({
current: e.detail.current
})
},
/*
点击领券
*/
receive() {
let couponList = this.data.dataArr.couponList;
if(wx.getStorageSync('token')==''){
wx.showToast({
title: '请先登录',
icon:"none"
})
return false;
}
if (this.data.dataArr.receive == 1) {
wx.showModal({
title: '温馨提示',
content: '恭喜您成功领取到福利优惠券,可去我的卡券查看并进行使用。',
cancelText: '知道了',
confirmText: '去使用',
cancelColor: '#333333',
confirmColor: '#f64f15',
success: res => {
if (res.confirm) {
wx.navigateTo({
url: `/pages/personal/coupons/coupons?shop_id=${couponList.shop_id}&currentTab=0`
})
}
}
})
} else {
get_tap_and_pay({
coupons_type_id: this.data.dataArr.couponList.id
}).then(RES => {
getIndexData({
addr_id: wx.getStorageSync('addr_id'), //城市id
lat: this.data.latitude ? this.data.latitude : app.globalData.myLatitude, //纬度
lng: this.data.longitude ? this.data.longitude : app.globalData.myLongitude, //经度
}).then(res => {
let dataArr = this.data.dataArr;
dataArr.couponList = res.data.couponList;
dataArr.receive = res.data.receive;
this.setData({
dataArr
});
wx.showModal({
title: '温馨提示',
content: '恭喜您成功领取到福利优惠券,可去我的卡券查看并进行使用。',
cancelText: '知道了',
confirmText: '去使用',
cancelColor: '#333333',
confirmColor: '#f64f15',
success: res => {
if (res.confirm) {
wx.navigateTo({
url: `/pages/personal/coupons/coupons?shop_id=${couponList.shop_id}&currentTab=0`
})
}
}
})
})
})
}
},
gotoBargaining() {
wx.navigateTo({
url: '/pages/bargaining/bargaining',
})
},
//获取首页的砍价信息
getIndexBargainfun(){
getIndexBargain({
}).then((res)=>{
if(res.code==0){
if( typeof res.data == 'object' ){
console.info("二次处理~");
let data=[];
for (let key in res.data) {
data.push(res.data[key]);
}
res.data=data;
}
if(res.data.length!=0){
res.data.map(item=>{
let current=Date.parse(new Date()) / 1000;//当前时间戳
if(item.bargain_end_time){
item.time=(item.bargain_end_time - current) * 1000;
}else{
item.time=0;
}
item.timeData={};
})
this.setData({
bargaindata:res.data,
isshowBargain:true,
})
}else{
this.setData({
isshowBargain:false,
})
}
}else{
this.setData({
isshowBargain:false,
})
}
})
},
/*
点击扫一扫
*/
feature(e) {
luma.scanqrcode();
},
/*
点击进去设置授权地理位置
*/
changeModalCancel() {
let that = this;
wx.showLoading({
title: '数据加载中...'
})
wx.openSetting({
success(res) {
if (res.authSetting['scope.userLocation'] == true) {
that.getlocal(); //获取地理位置
}
}
})
},
/*
选择城市站点
*/
switchcity() {
wx.navigateTo({
url: '/pages/index/switchcity/switchcity',
})
},
/*
tab切换
*/
tagglenav(e) {
this.setData({
active: e.currentTarget.dataset.type
})
},
/*
倒计时
*/
onChange(e) {
this.setData({
timeData: e.detail
});
},
//砍价的倒计时
onChangekj(e){
let bargaindata=this.data.bargaindata;
bargaindata[e.currentTarget.dataset.index].timeData=e.detail;
this.setData({ bargaindata });
},
onloadtwo(bool){
if(bool){
this.getIndexDatafun()
this.getUserLocation(); //获取位置信息
// this.getIndexBargainfun();//重新获取下
}
},
/*
首页数据
*/
getIndexDatafun() {
let skill_list = {
list: [],
top: {}
};
let obj = {
addr_id: wx.getStorageSync('addr_id'), //城市id
lat: this.data.latitude ? this.data.latitude : app.globalData.myLatitude, //纬度
lng: this.data.longitude ? this.data.longitude : app.globalData.myLongitude, //经度
};
if(this.data.shareuid){
obj.shareuid = this.data.shareuid;
}
getIndexData({
...obj,
}).then(res => {
if (res.code == 0) {
app.globalData.is_closed = res.data.is_closed
res.data.skill_list.map((item, index) => {
item.store_count = Number(item.store_count);
item.sold_num = Number(item.sold_num);
})
if (res.data.skill_list.length >= 2) {
res.data.skill_list.map((item, index) => {
if (index != 0) {
skill_list.list.push(item);
}
})
}
if(res.data.skill_list[0]){
skill_list.top = res.data.skill_list[0];
if (skill_list.top.store_count == 0) {
skill_list.top.proportion = 100;
} else {
//已购+剩余库存=总数
let totalNum = skill_list.top.sold_num + skill_list.top.store_count;
//百分比
skill_list.top.proportion = (skill_list.top.sold_num / totalNum * 100).toFixed(2);
}
}
this.setData({
dataArr: res.data,
skill_list
});
}
})
},
/*
外卖列表
*/
getEleShopfun() {
console.info("获取外卖~~");
wx.showLoading({
title: '加载中...'
});
let page = this.data.page;
page++;
getEleShop({
lat: this.data.latitude ? this.data.latitude : app.globalData.myLatitude, //纬度
lng: this.data.longitude ? this.data.longitude : app.globalData.myLongitude, //经度
city_id: this.data.city_id, //城市id wx.getStorageSync('city_id'),
addr_id: wx.getStorageSync('addr_id'),
page: page, //页码
sort: 0, //排序
}).then(res => {
wx.hideLoading();
if (res.code == 0) {
this.setData({
shop_list: [...this.data.shop_list, ...res.data.shop_list], //商家列表
isallshow: res.data.shop_list.length == 0, //是否触底了
page,
})
}
wx.stopPullDownRefresh(); //结束下拉刷新
})
},
/*
商城列表
*/
getSelectShopfun() {
wx.showLoading({
title: '加载中...'
});
let page2 = this.data.page2;
page2++;
getSelectShop({
page: page2,
type: '2', //1:获取5条数据 2:获取全部 1获取4条 2获取全部
}).then(res => {
wx.hideLoading(); //结束加载
if (res.code == 0) {
this.setData({
youxuanlisttow: [...this.data.youxuanlisttow, ...res.data.list], //优选的
isTheBottom: res.data.list.length == 0, //是否触底了
page2
})
}
wx.stopPullDownRefresh(); //结束下拉刷新
})
},
/*
轮播盒子高度
*/
getHeight(e) {
let winWid = wx.getSystemInfoSync().windowWidth; //当前屏幕宽度
let imgh = e.detail.height; //图片高度
let imgw = e.detail.width; //图片宽度
this.setData({
sH: winWid * imgh / imgw + "px"
});
},
/*
地理位置授权
*/
getlocal() {
var that = this;
wx.showLoading({
title: '正在获取位置信息...',
})
wx.getLocation({
type: 'gcj02',
success: function (res) {
app.globalData.myLatitude = res.latitude;
app.globalData.myLongitude = res.longitude;
that.setData({
latitude: res.latitude,
longitude: res.longitude
})
that.getIndexDatafun(); //首页数据
//用腾讯地图的api,根据经纬度获取城市
qqmapsdk.reverseGeocoder({
location: {
latitude: res.latitude,
longitude: res.longitude
},
success: function (res) {
wx.hideLoading();
var i = res.result.ad_info;
var a = res.result.address_component;
var addr_id = i.city_code.substring(i.nation_code.length, 30);
app.globalData.myAddress = a.city + a.district;
let myCity = a.city.substring(0, a.city.length - 1);
app.globalData.myCity = myCity;
app.globalData.addr_id = addr_id;
wx.setStorageSync('myCity', myCity);
wx.setStorageSync('addr_id', addr_id);
that.setData({
myCity: myCity,
addr_id: addr_id
})
that.saveSignTime(res.result.ad_info.adcode);
that.getEleShopfun(); //外卖
// that.setData({
// page:0,
// shop_list:[],
// })
// that.getEleShopfun(); //外卖
},
fail() { //点击了取消 位置获取失败
wx.hideLoading();
that.setData({
toaddInfo: false,
});
that.getEleShopfun(); //外卖
}
})
},
fail: function (err) {
wx.hideLoading();
that.setData({
toaddInfo: false,
myCity: '未授权'
}); //位置获取失败
that.getIndexDatafun(); //首页数据
// that.setData({
// page:0,
// shop_list:[],
// })
// that.getEleShopfun(); //外卖
}
})
},
/*
再次调起授权信息
*/
getUserLocation() {
let that = this;
wx.getSetting({ //返回已经向用户请求过的权限
success: (res) => {
if (res.authSetting['scope.userLocation'] == undefined) { //第一次进行授权
that.getlocal(); //位置授权
} else {
if (!res.authSetting['scope.userLocation']) { //拒绝了位置授权
wx.showModal({
title: '提示',
content: '取消授权将影响使用,为了不影响您的体验请点击右上角三点设置中打开位置授权',
showCancel: false
})
that.getIndexDatafun(); //首页数据
} else {
that.getlocal(); //位置授权
}
}
}
})
},
/*
一键回到顶部
*/
goTop() {
if (wx.pageScrollTo) {
wx.pageScrollTo({
scrollTop: 0
})
} else {
wx.showModal({
title: '提示',
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
})
}
},
/*
优惠券弹窗消失
*/
onClose() {
this.setData({
dialogShow: false,
})
},
/*
第一次进入弹窗优惠券
*/
saveSignTime(adcode) {
saveSignTime({
adcode: adcode,
}).then(res => {
if (res.code == 0) {
if (res.data.loginStatus == 1) { //可以显示
if (res.data.couponList.length != 0) {
res.data.couponList.map((item, index) => {
item.hu = 1;
})
this.setData({
dialogShow: true, //优惠券弹窗
couponList: res.data.couponList
})
}
}
}
})
},
/*
监听滚动
*/
onPageScroll({
scrollTop
}) {
this.setData({
scrollTop
});
if (scrollTop > 200) { //处理返回顶部
this.setData({
floorstatus: true
});
} else {
this.setData({
floorstatus: false
});
}
if (scrollTop > 37) { //顶部搜索栏背景改变
this.setData({
isbottbg: true
});
} else {
this.setData({
isbottbg: false
});
}
if (scrollTop > 500) { //过期优惠券弹出处理
this.setData({
num: ++this.data.num
})
if (this.data.num == 1) { //只执行一次
this.couponRecordFun()
}
}
},
/*
点击去登陆 显示 授权弹窗
*/
sctcimg(e) {
this.setData({
hidden: true,
hidel: false,
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
// 一进来默认登录
if(wx.getStorageSync('token')==''){
this.sctcimg();
}
this.setData({
bargaindata:[]
})
// this.getIndexBargainfun();//砍价
this.getsetsubscript();//设置角标
this.setData({ //检测是否登陆
hidel: wx.getStorageSync('userInfo') == '',
num: 0,
randomNumber: parseInt(800 + Math.random() * 1000)
});
console.log(this.data.randomNumber)
if (wx.getStorageSync('change_city')) { //如果是选择地址回来的
wx.setStorageSync('change_city', "");//清楚 防止再进来 MB
this.setData({
addr_id: wx.getStorageSync('addr_id'),
myCity: wx.getStorageSync('myCity'),
city_id: wx.getStorageSync('city_id'),
latitude: app.globalData.myLatitude,
longitude: app.globalData.myLongitude,
shop_list: []
})
qqmapsdk.reverseGeocoder({ //用腾讯地图的api,获取adcode
location: {
latitude: this.data.latitude,
longitude: this.data.longitude
},
success: (res) => {
this.saveSignTime(res.result.ad_info.adcode);
}
})
this.setData({
page:0,
})
this.getEleShopfun(); //外卖
this.getIndexDatafun(); //首页数据
} else {
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
luma.scenego(options); //扫码过来跳转
this.setData({ //顶部通知栏高度
statusBarHeight: wx.getSystemInfoSync().statusBarHeight * 2,
shareuid:options.shareuid,//分享人id
})
if(options.shareuid){
wx.setStorageSync('shareuid', options.shareuid)
}else{
this.setData({ //顶部通知栏高度
shareuid:wx.getStorageSync("shareuid"),//分享人id
})
}
this.getUserLocation(); //获取位置信息
this.getSelectShopfun(); //优选商品
},
onHide() {
this.setData({
hidden: false
});
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
this.setData({
page: 0,
page2: 0,
shop_list: [],
youxuanlisttow: [],
isTheBottom: false,
isallshow: false,
})
this.getUserLocation(); //获取位置信息
this.getSelectShopfun(); //优选商品 好货
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
console.info("触发底部瀑布流~~~");
if (!this.data.isallshow && this.data.active == 0) {
this.getEleShopfun(); //外卖
}
if (!this.data.isTheBottom && this.data.active == 1) {
this.getSelectShopfun(); //优选商品 好货
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
let userInfo = wx.getStorageSync('userInfo');
let user_id = "";
let title = ``;
if(userInfo.info){
user_id = userInfo.info.user_id;
title = `${userInfo.info.nickname}喊你: 上鹿马加油更优惠更便捷,为鹿马加油。`
}else{
title = '上鹿马加油更优惠更便捷,我们一起为鹿马加油。';
}
return {
title: title,
path:"/pages/index/index?shareuid="+user_id,
//imageUrl: this.data.clientImgPath+'/images/sharethumbnail.jpg?1='+Math.random()
imageUrl: this.data.clientImgPath+'/images/gasstation/gasstationibann.jpg?1='+Math.random()
}
},
/**
* 分享朋友圈
*/
onShareTimeline() {
let userInfo = wx.getStorageSync('userInfo');
let title = ``;
let user_id = "";
if(userInfo.info){
title = `${userInfo.info.nickname}喊你: 上鹿马加油更优惠更便捷,为鹿马加油。`
user_id = userInfo.info.user_id
}else{
title = '上鹿马加油更优惠更便捷,我们一起为鹿马加油。';
}
return {
title: title,
query:"shareuid="+user_id,
imageUrl:this.data.clientImgPath+'/images/gasstation/gasstationibann.jpg?1='+Math.random()
}
},
//设置角标
getsetsubscript() {
setsubscript({}).then(() => {});
},
})
\ No newline at end of file
{
"usingComponents": {
"van-count-down": "../../@vant/weapp/lib/count-down/index",
"Stars": "/components/Stars/Stars",
"recommend":"/components/recommend/recommend",
"mp-dialog": "/@vant/weapp/lib/popup/index",
"promptPopup":"/components/promptPopup/promptPopup",
"loginPopup":"/components/loginPopup/loginPopup",
"goodsItem":"/components/goodsItem/goodsItem",
"shareEarnItem":"/components/shareEarnItem/shareEarnItem",
"empty":"/@vant/weapp/lib/empty/index"
},
"navigationBarTitleText": "鹿马108",
"enablePullDownRefresh":true,
"navigationBarBackgroundColor": "#f64f15",
"navigationBarTextStyle": "white",
"navigationStyle":"custom"
}
\ No newline at end of file
<view class="posr" style="padding-top:{{statusBarHeight+90}}rpx">
<!-- 这里减去得高度是 下面隐藏得div高度 420 -->
<!-- {{ 880-420 + BargainHeight + statusBarHeight}} -->
<!-- <image src="/images/index/bjbanner2.png" class="w1005" style="display: block;height:{{ 880-420 + statusBarHeight}}rpx"></image> -->
<!-- statusBarHeight -->
<!-- <image wx:if="{{isshowBargain}}" src="{{clientImgPath}}/2020/index/indexsbgstwo.png" class="w1005" style="display: block;height:{{998+statusBarHeight}}rpx"></image>
<image wx:else src="{{clientImgPath}}/2020/index/indexsbgstwo1.png" class="w1005" style="display: block;height:{{664+statusBarHeight}}rpx"></image> -->
<!-- 677 -->
<!-- wx:if="{{isshowBargain}}"
<image wx:else src="/images/index/bjbanner2.png" class="w1005" style="display: block;height:{{ 880-420 + statusBarHeight}}rpx"></image> -->
<!-- 搜索 18-->
<view class="flex acen w1005 posf bgF64 {{isbottbg?'bgF64':''}}" style="padding:{{8+(statusBarHeight/2)}}px 192rpx 25rpx 22rpx;top:0;z-index: 999;transition:.4s ease;">
<view class="flex acen mr-20" catchtap="{{myCity!='正在定位'&&myCity!='未授权'?'switchcity':'changeModalCancel'}}" style="max-width:154rpx;">
<image class="map" mode="widthFix" src="{{clientImgPath}}/images/index/weizhi-3@2x.png"></image>
<text class="s30 cf oneline ml-10 mr-10">{{myCity}}</text>
<image class="jiantou" src="{{clientImgPath}}/images/index/xiangxia-4@2x.png" mode=""></image>
</view>
<navigator url="/pages/index/seek/seek" hover-class="none" class="search_input flex acen pl-20 pr-20">
<image src="{{clientImgPath}}/2020/index/shousuo.png" style="width: 28rpx;height: 28rpx;"></image>
<input class="flex1 h1005 ml-10" type="text" value="" placeholder="搜索吃喝玩乐..." placeholder-class="s26 cf" disabled />
</navigator>
</view>
<!-- 顶部内容 -->
<!-- 96+statusBarHeight -->
<!-- <view class="headscentent w1005 posa" style="top:0;padding-top:{{330+statusBarHeight}}rpx;" > -->
<!-- 砍价板块 -->
<!-- <view class="nutrition xrbtbox_two" style="" wx:if="{{isshowBargain}}" >
<view class="">
<view class="nutrition_1_1" style="color: #B05300;align-items: center;">
<view class="flex ali-c" style="font-size:34rpx;">
<text style="font-weight:bold;">喊好友一起砍</text>
<view class="hotcss">HOT</view>
</view>
<view style="font-size:28rpx"><text>现有{{randomNumber}}人在浏览</text></view>
</view>
</view>
<view class="bargainingentry">
<swiper circular indicator-dots="{{false}}" autoplay="{{true}}" interval="{{5000}}" vertical="{{true}}" >
<block wx:for="{{bargaindata}}" wx:key="index" class="mb-20">
<swiper-item>
<view class="bargainingitme flex">
<navigator hover-class="none" url="/pages/bargaining/bargaining" class="goodsleft">
<image class="" src="{{staticUrl}}{{item.photo}}"></image>
</navigator>
<view class="goodsrigs flex1">
<navigator hover-class="none" url="/pages/bargaining/bargaining" wx:if="{{item.time<=0 && item.bargain_percent!=100}}">
<view class="nargtit oneline">{{item.title}}</view>
<view class="progrebox" >
<progress percent="100" stroke-width="12" activeColor="#F9EF7D" style="width:100%;" />
<view class="progreboxtext">需邀请 {{ item.bargain_num }} 位好友</view>
</view>
<view class="basprice">
原价¥<text class="yjtest mr-20" wx:if="{{item.bargain_percent !=100}}">{{ (item.mall_price) }}</text> <text class="yjtest mr-20" wx:if="{{item.bargain_percent==100}}">{{ (item.goods_price) }}</text>砍价后¥<text class="kprice">{{(item.bargain_price) }}</text>
</view>
<view class="flex jus-e">
<view class="inneruser ali-c jus-c" wx:if="{{item.bargain_percent==100}}">您的砍价成功</view>
<view class="inneruser ali-c jus-c" wx:if="{{item.bargain_percent !=100}}">点击立即砍价</view>
</view>
</navigator>
<navigator hover-class="none" url="/pages/bargainingdetails/bargainingdetails?bargain_id={{item.bargain_id}}" wx:else>
<view class="nargtit oneline">{{item.title}}</view>
<view class="progrebox">
<progress percent="{{item.bargain_percent}}" stroke-width="12" activeColor="#F9EF7D" style="width:100%;" />
<view class="progreboxtext">已砍{{item.bargain_percent}}%</view>
</view>
<van-count-down use-slot time="{{ item.time}}" bind:change="onChangekj" data-index="{{index}}" >
<text class="countItem">{{ item.timeData.days <10 ? '0' + item.timeData.days : item.timeData.days }}</text>
<text class="cf">天 </text>
<text class="countItem">{{ item.timeData.hours <10 ? '0' + item.timeData.hours : item.timeData.hours }}</text>
<text class="cf">时 </text>
<text class="countItem">{{ item.timeData.minutes<10?'0'+ item.timeData.minutes: item.timeData.minutes }}</text>
<text class="cf">分 </text>
<text class="endtetx">后结束</text>
</van-count-down>
<view class="flex jus-e">
<view class="inneruser ali-c jus-c" wx:if="{{item.bargain_percent!=100}}" >邀请好友继续砍</view>
<view class="inneruser ali-c jus-c" wx:if="{{item.bargain_percent==100}}">您的砍价成功</view>
</view>
</navigator>
</view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view> -->
<!-- 砍价板块end -->
<!-- 新人补贴已到 -->
<!-- <view class="bgf xrbtbox {{isshowBargain?'no':''}}">
<view class="s34 fwb" style="color: #B05300;">平台优惠券 请领取</view>
<view class="w1005 posr mt-20" style="height: 152rpx;">
<image src="/images/index/btbanner.png" class="w1005 h1005"></image>
<view class="w1005 h1005 posa ali-c jus-b" style="top: 0;padding:0 0 0 24rpx;">
<view class="flex1">
<view class="s28 c66 tc w1005 " style="letter-spacing:2rpx;">
手慢无券
</view>
<view class="s32 c30 fwb ali-c mt-10 w1005 jus-c">
优惠券 满 {{ dataArr.couponList.at_least }}
<view class="cf ml-10 mr-10 jian">减</view>
{{dataArr.couponList.money}}
</view>
</view>
<view class="h1005 ali-c jus-c pl-10" style="width:308rpx;">
<image src="/images/index/botton.gif" style="width: 200rpx;height: 70rpx;" catchtap="receive"></image>
</view>
</view>
</view>
</view> -->
<!-- </view> -->
<!-- 灰色背景部分 -->
<view class="w1005" style="padding: 0 24rpx;">
<!-- 五大分类 -->
<view class="flex-wrap jus-b" style="padding: 25rpx 0;">
<view class="s24 c33 tc " wx:for="{{dataArr.homemenu}}" wx:key="index" catchtap="jumpMenu" data-url="{{classify}}" data-urls="{{put}}" data-catid="{{item.cat_id}}" data-isswitch="{{item.is_switchTab}}" data-index="{{index+1}}">
<image src="{{item.icon}}" class="zi_img"></image>
<view class="mt-10">{{ item.title }}</view>
</view>
</view>
<!-- 轮播 -->
<view class="image-wrapper posr">
<swiper style="height: 160rpx;" circular autoplay interval="2200" indicator-active-color="#fff" duration="800" bindchange="bindchange">
<swiper-item class="swiper-item" wx:for="{{dataArr.indexfocus}}" wx:key="index">
<view class="w1005 h1005 ">
<image src="{{staticUrl+item.photo}}" class="loaded w1005" style="height:160rpx;" bindload='getHeight' catchtap="onDetail" data-url="{{item.link_url}}">
</image>
</view>
</swiper-item>
</swiper>
<!-- 指示点 -->
<view wx:if="{{dataArr.indexfocus.length>1}}" class="posa" style="bottom:20rpx;right:20rpx;">
<view class="ali-c">
<view class="bgf dian {{current==index?'op1':''}}" wx:for="{{dataArr.indexfocus}}" wx:key="index">
</view>
</view>
</view>
</view>
<!-- 限时秒杀 -->
<view wx:if="{{skill_list.top.goods_id || skill_list.list.length!=0}}" class="posr mt-20" style="height:690rpx;">
<image src="{{clientImgPath}}/2020/index/msbj.png" class="w1005 h1005"></image>
<view class="w1005 h1005 posa" style="top: 0;padding: 22rpx;">
<!--正在秒杀中 倒计时 -->
<view class="ali-c jus-c" wx:if="{{dataArr.time==0}}">
<view class="fwb cf s40">正在疯抢</view>
<view class="ml-20">
<van-count-down use-slot time="{{ dataArr.miao * 1000 }}" bind:change="onChange">
<text class="countItem">{{ timeData.hours <10 ? '0' + timeData.hours : timeData.hours }}</text>
<text class="cf">: </text>
<text class="countItem">{{ timeData.minutes<10?'0'+ timeData.minutes: timeData.minutes }}</text>
<text class="cf">: </text>
<text class="countItem">{{ timeData.seconds < 10?'0'+ timeData.seconds : timeData.seconds }}</text>
</van-count-down>
</view>
<view class="cf s30 ml-20">后结束</view>
</view>
<!-- 即将开抢 -->
<view class="ali-c jus-c" wx:else>
<view class="fwb cf ali-c jus-c">
<view class="s40 ml-10">{{dataArr.time}}</view>
<view class="ml-10" style="margin-bottom:2rpx;">即将开抢</view>
</view>
<view class="ali-c ml-20">
<view class="ali-c xqimgbox">
<image src="{{item}}" wx:for="{{dataArr.seckill_faces}}" wx:key="index"></image>
</view>
<view class="cf s32 ml5">{{dataArr.seckill_num}}人想抢</view>
</view>
</view>
<!-- 内容 -->
<view class="bgf w1005 mt-20 ali-c" style="border-radius: 20rpx 20rpx 0 0;padding: 20rpx;">
<view class="mr-25">
<image src="{{staticUrl}}{{skill_list.top.photo}}" style="width: 195rpx;height: 195rpx;" class="br10"></image>
</view>
<view class="flex1" catchtap="miaotap">
<view class="s32 oneline fwb">{{skill_list.top.title}}</view>
<view class="s30 cF64 ali-c mt-15">
<view class="flex1 posr" style="border-radius: 14rpx;overflow: hidden;">
<progress percent="{{skill_list.top.proportion}}" activeColor="#FD2A00" active stroke-width="14" style="width:100%;" />
<view class="posa w1005 h1005 pl-30 cf s20" style="top: 0;line-height: 28rpx;">
仅剩{{skill_list.top.store_count}}件
</view>
</view>
<view class="ml-20">已抢{{skill_list.top.sold_num}}件</view>
</view>
<view class="ali-c mt-25 btnBox">
<view class="flex1 cF64 s24 h1005 tc" style="line-height: 58rpx;">秒杀价 <text
style="font-size: 48rpx;">{{skill_list.top.seckill_price}}</text></view>
<view class="cf h1005 tc fwb qiang">抢</view>
</view>
</view>
</view>
<!-- 三个内容 -->
<view class="bgf w1005 mt-10 ali-c pd20" style="border-radius: 0 0 20rpx 20rpx;">
<view style="width: 194rpx;" wx:for="{{skill_list.list}}" wx:key="index" catchtap="miaotap" class="{{skill_list.list.length-1==index?'':'mr-20'}}">
<image class="br10 w1005" src="{{staticUrl}}{{item.photo}}" style="height: 194rpx;"></image>
<view class="s28 tc oneline" style="color: #010101;">{{item.title}}</view>
<view class="ali-c mt-10 btnBox2">
<view class="flex1 c33 s18 h1005 tc" style="background: #FBD526;">
¥ <text class="s30 fwb cF64">{{item.seckill_price}}</text>
</view>
<view class="cf h1005 tc fwb qiang2" style="">抢</view>
</view>
</view>
</view>
</view>
</view>
<!-- 推荐好店 优选品商城 -->
<view class="">
<view class="ali-c lh90 posr">
<view class="s36 fwb flex1 tc" catchtap="tagglenav" data-type="0">
好店推荐
</view>
<view class="s36 fwb flex1 tc c16" catchtap="tagglenav" data-type="1">
分享赚钱
</view>
<view class="posa bgF64 xian {{active==0?'xianL':'xianLTow'}}"></view>
</view>
<!-- 好店推荐 -->
<view class="mt-20" wx:if="{{active==0}}">
<recommend shop_list="{{shop_list}}"></recommend>
<empty wx:if="{{shop_list.length==0}}"></empty>
<!-- 没有数据 -->
<view class="tc c80 s28 mt-20 mb-20" wx:if="{{isallshow}}">
亲!已经到底了哦~
</view>
</view>
<!-- 优选商城 -->
<view class="mt-20" wx:else>
<!-- <goodsItem array="{{youxuanlisttow}}"></goodsItem> -->
<view class="flex jus-a flex-wrap">
<shareEarnItem wx:for="{{youxuanlisttow}}" wx:key="index" wx:for-item="item" goods_id="{{item.goods_id}}" itemdata="{{item}}"></shareEarnItem>
</view>
<view class="tc c80 s28 mt-20 mb-20" wx:if="{{isTheBottom}}">
亲!已经到底了哦~
</view>
</view>
</view>
</view>
</view>
<!-- 优惠券弹窗 -->
<mp-dialog title="test" show="{{dialogShow}}" zIndex="9999" bind:close="onClose">
<view class="couponsBox">
<image class="couponsImg" src="{{clientImgPath}}/2020/index/couponstopimg.png"></image>
<view class="kqBox">
<!-- 优惠券 -->
<view class="jus-b itemCoupons" wx:for='{{couponList}}' wx:key="index">
<image src="{{img_host}}/attachs/{{item.photo}}" style="width: 150rpx;height: 150rpx;" class=""></image>
<view class="flex1 flexv jus-b" style="padding: 13rpx 20rpx;">
<view class="couponsTitle oneline" wx:if='{{item.coupon_name!=null}}'>{{item.coupon_name}}</view>
<view class="couponsTitle oneline" wx:else>{{item.shop_name}}</view>
<view class="itemLabel tc">店铺红包</view>
<view class="jus-b ">
<view class="preferential oneline">满 <text>{{item.at_least}}</text>减<text>{{item.money}}</text>
</view>
<view bindtap="useMethod" data-id="{{item.id}}" data-item="{{index}}">
<text wx:if="{{item.hu==1}}" class="couponsbtn">立即领取</text>
<text wx:if="{{item.hu==2}}" class="couponsbtns">已领取</text>
</view>
</view>
</view>
</view>
</view>
<view class="yhqhah">
领取的优惠券请前往我的卡券包进行使用
</view>
</view>
<!-- 删除 -->
<view class="jus-c mt-20">
<image src="{{clientImgPath}}/images/sanchu.png" bindtap="onClose" style="width: 53rpx;height:53rpx;">
</image>
</view>
</mp-dialog>
<!--返回顶部 -->
<image src='{{clientImgPath}}/images/uts/fanhuidb.png' class='goTop' hidden='{{!floorstatus}}' bindtap="goTop"></image>
<!-- 红包过期提醒 -->
<promptPopup show='{{sctcimg}}' />
<!-- 是否登录显示 -->
<!-- <loginPopup show='{{hidel}}' bindsctcimg="sctcimg" /> -->
<!-- 登陆授权弹窗 -->
<login hidden="{{hidden}}" bind:setUserInfo="onloadtwo" />
\ No newline at end of file
page {
background: #EDEBEB;
padding-bottom: 80rpx !important;
}
.pd20 {
padding: 20rpx;
}
.cF64 {
color: #F64F15;
}
.c16 {
color: #161616;
}
.bgF64 {
background: #F64F15;
}
.cE6 {
color: #E6E6E6;
}
view {
box-sizing: border-box;
}
.map {
width: 21rpx;
height: 28rpx;
margin-top: 2rpx;
}
.jiantou {
width: 24rpx;
height: 13.32rpx;
}
.search_input {
width: 270rpx;
height: 60rpx;
border-radius: 30rpx;
overflow: hidden;
margin: 0 auto;
background: rgba(255, 255, 255, 0.3);
}
.countssun {
background: #FF0000;
top: -28rpx;
right: -16rpx;
border-radius: 50%;
width: 46rpx;
height: 46rpx;
text-align: center;
line-height: 46rpx;
}
.zi_img {
width: 92rpx;
height: 92rpx;
}
.image-wrapper {
border-radius: 16rpx;
overflow: hidden;
}
.uni-swiper-dots {
left: 80% !important;
}
.uni-swiper-dots-horizontal {
left: 80% !important;
}
.btnBox {
width: 364rpx;
height: 62rpx;
border-radius: 31rpx;
background: #FBD526;
overflow: hidden;
}
.qiang {
background: #FD2A00;
width: 117rpx;
line-height: 60rpx;
font-size: 44rpx;
}
.qiang2 {
width: 75rpx;
line-height: 41rpx;
}
.btnBox2 {
width: 193rpx;
height: 42rpx;
background: #FD2A00;
border-radius: 21rpx;
overflow: hidden;
}
.xian {
bottom: 0;
width: 106rpx;
height: 12rpx;
border-radius: 6rpx;
transition: 0.3s ease;
}
.xianL {
left: 122rpx;
}
.xianLTow {
left: 476rpx;
}
.countItem {
display: inline-block;
width: 39rpx;
margin-right: 10rpx;
color: #F64F15;
font-size: 22rpx;
text-align: center;
background-color: #ffffff !important;
border-radius: 4rpx;
}
.xrbtbox {
width: 702rpx;
margin: 10rpx auto 0 auto;
padding: 25rpx 20rpx;
padding-top: 15rpx;
border-radius: 20rpx;
/* border-bottom-left-radius: 20rpx;border-bottom-right-radius: 20rpx; */
}
.xrbtbox.no{
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.xrbtbox_two {
width: 702rpx;
margin: 10rpx auto 0 auto;
padding: 15rpx 20rpx;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
}
.dian {
width: 10rpx;
height: 10rpx;
background-color: #FFFFFF;
opacity: 0.55;
border-radius: 50%;
margin-right: 10rpx;
}
.op1 {
opacity: 1 !important;
}
.headscentent{
/* margin-top: -365rpx; */
}
/* 砍价入口 */
.bargainingentry{
height: 240rpx;
}
.bargainingitme{
padding: 20rpx;
background: linear-gradient(173deg, #fb8138, #F75619, #FB5838, #f14b2b);
border-radius: 10px;
height: 230rpx;
}
.bargainingitme .goodsleft{
width: 188rpx;
height: 188rpx;
border-radius: 10rpx;
}
.bargainingitme .goodsleft image{
border-radius: 10rpx;
}
.bargainingitme .goodsrigs{
margin-left: 30rpx;
}
.goodsrigs .nargtit{
color: #FFFFFF;
font-size: 30rpx;
font-weight: bold;
/* margin-bottom: 4rpx; */
letter-spacing: 1px;
margin-bottom: 12rpx;
}
.goodsrigs .inneruser{
display: inline-block;
margin-top: 10rpx;
color: #FC5E4D;
font-size: 30rpx;
font-weight: bold;
/* height: 50rpx;
line-height: 50rpx; */
background: #FFFFFF;
border-radius: 30rpx;
padding: 10rpx 30rpx;
box-sizing: border-box;
font-weight: blod;
}
.bargainingitme .countItem{
background-color: transparent !important;
border:1rpx solid #fff;
color: #fff;
height: 33rpx;
line-height: 33rpx;
width: 33rpx;
}
.bargainingitme .endtetx{
margin-left: 20rpx;
color: #fff;
font-size: 30rpx;
font-weight: bolder;
}
.progrebox{
width: 210rpx;
margin-bottom: 12rpx;
position: relative;
height: 22rpx;
border-radius: 10rpx;
overflow: hidden;
}
.progreboxtext{
width: 100%;
text-align: center;
position: absolute;
top: -2px;
left: 0rpx;
color: #FB7152;
font-size: 20rpx;
}
.basprice {
color: #fff;
font-size: 26rpx;
}
.basprice .kprice{
color: #F9F17E;
font-size: 32rpx;
font-weight: bold;
}
.basprice .yjtest{
text-decoration:line-through;
}
/* 砍价入口end */
/* 优惠券弹窗 */
.couponsBox {
width: 578rpx;
background: #FF2734;
position: relative;
border-radius: 40rpx;
padding-top: 220rpx;
padding-bottom: 40rpx;
box-sizing: border-box;
overflow: hidden;
}
.couponsImg {
width: 100%;
height: 316rpx;
top: -80rpx;
position: absolute;
}
.itemCoupons {
background: #fff;
width: 495rpx;
border-radius: 10rpx;
overflow: hidden;
margin: 0 auto 20rpx auto;
}
.couponsTitle {
font-size: 29rpx;
font-weight: bold;
}
.itemLabel {
color: #E3AA5B;
font-size: 18rpx;
padding: 0rpx 5rpx;
border: 1px solid #E3AA5B;
width: 110rpx;
}
.preferential {
color: #FF0026;
font-size: 18rpx;
}
.preferential text {
font-size: 32rpx;
}
.couponsbtn {
color: #fff;
font-size: 22rpx;
background: #FD0222;
border-radius: 10rpx;
line-height: 40rpx;
padding: 5rpx 16rpx;
}
.couponsbtns {
color: #fff;
font-size: 22rpx;
background: rgb(245, 97, 116);
border-radius: 10rpx;
line-height: 40rpx;
padding: 5rpx 16rpx;
}
.con_banner .img {
width: 100%;
height: 160rpx;
}
.kqBox {
width: 100%;
max-height: 1000rpx;
overflow-x: hidden;
}
.yhqhah {
width: 100%;
color: rgb(255, 255, 255);
text-align: center;
font-size: 23rpx;
}
.jian {
background: #000000;
width: 58rpx;
height: 58rpx;
line-height: 56rpx;
text-align: center;
border-radius: 50%;
}
.xqimgbox image {
width: 40rpx;
height: 40rpx;
border: 4rpx solid #fff;
border-radius: 50%;
margin-left: -20rpx;
}
.xqimgbox image:nth-child(1) {
margin-left: 0rpx !important;
z-index: 10;
}
.xqimgbox image:nth-child(2) {
z-index: 9;
}
.xqimgbox image:nth-child(3) {
z-index: 8;
}
.nutrition {
border: 1px solid #eee;
background: rgba(255, 255, 255, 1);
}
.nutrition_1 {
height: 340rpx;
display: flex;
vertical-align: center;
}
.nutrition_2 {
width: 350rpx;
height: 300rpx;
}
.nutrition_1_1 {
display: flex;
padding: 0 0 20rpx 0;
justify-content: space-between;
/* margin-top: 10rpx; */
}
.commodity_img {
width: 90%;
margin: 0 auto;
height: 220rpx;
}
.commodity {
display: inline-block;
width: 275rpx;
background-image: linear-gradient(180deg, #F79822, #F64F15);
height: 100%;
margin-right: 10rpx;
padding-top: 10rpx;
box-sizing: border-box;
border-radius: 10rpx;
}
.hotcss {
background-color: red;
color: #fff;
font-size: 18rpx;
padding: 2rpx 10rpx;
box-sizing: border-box;
display: inline-block;
margin-left: 10rpx;
border-radius: 10rpx;
}
\ No newline at end of file
var city = require('../../../utils/city.js');
var app = getApp();
var img_host = app.globalData.ImgPath;
var clientImgPath = app.globalData.clientImgPath;
import { getCitys, bindCity, getAreaList } from '../../../api/index.js';
Page({
data: {
img_host: img_host,
clientImgPath: clientImgPath,
showDialog: false,//弹出
countyList: [],//区县列表
searchLetter: [],
keyword: '',
showLetter: "",
winHeight: 0,
// tHeight: 0,
// bHeight: 0,
cityList: [],
isShowLetter: false,
scrollTop: 0,//置顶高度
scrollTopId: '',//置顶id
current_city_name: "",
current_city_id: '8',
hotcityList: [],
locationlog:[],
},
bindScroll() {
},
onShow() {
let locationlog = wx.getStorageSync("locationlog");
if (locationlog) {
this.setData({
locationlog: locationlog,
})
}
},
onLoad: function () {
// 生命周期函数--监听页面加载
var that = this;
// 生命周期函数--监听页面加载
var searchLetter = city.searchLetter();
var cityList = city.cityList();
var sysInfo = wx.getSystemInfoSync();
var winHeight = sysInfo.windowHeight;
var itemH = winHeight / searchLetter.length;
var tempObj = [];
for (var i = 0; i < searchLetter.length; i++) {
var temp = {};
temp.name = searchLetter[i];
temp.tHeight = i * itemH;
temp.bHeight = (i + 1) * itemH;
tempObj.push(temp)
}
// that.cutcity(options);
that.setData({
winHeight: winHeight,
itemH: itemH,
searchLetter: tempObj,
})
that.getCitys();
},
getCitys: function () {
var that = this;
let params = { key: that.data.keyword }
getCitys(params).then(res => {
if (res.code == 0) {
that.setData({
cityList: res.data.city_list,
hotcityList: res.data.hot_citys,
current_city_name: wx.getStorageSync("myCity") || '南昌',
current_city_id: wx.getStorageSync("city_id") || '8',
})
}
console.log(this.data.current_city_id)
});
},
searchInput: function (e) {
this.data.keyword = e.detail.value;
},
search: function () {
this.getCitys();
},
clickLetter: function (e) {
console.log(e.currentTarget.dataset.letter)
var showLetter = e.currentTarget.dataset.letter;
this.setData({
showLetter: showLetter,
isShowLetter: true,
scrollTopId: showLetter,
})
var that = this;
setTimeout(function () {
that.setData({
isShowLetter: false
})
}, 1000)
},
//选择城市
bindCity: function (e) {
var that = this;
let params = { city_id: e.currentTarget.dataset.city_id }
bindCity(params).then(res => {
if (res.code == 0) {
that.setData({
current_city_name: res.data.city.name,
current_city_id: res.data.city.city_id,
})
app.globalData.myLatitude = res.data.city.lat;
app.globalData.myLongitude = res.data.city.lng;
wx.setStorageSync("city_id", res.data.city.city_id);
wx.setStorageSync("myCity", res.data.city.name);
wx.setStorageSync("addr_id", res.data.city.addr_id);
wx.setStorageSync("change_city", 1);
wx.navigateBack();
}
});
},
//选择城市
bindCitys: function (e) {
var that = this;
let hha = e.currentTarget.dataset.addr_id;
let params = { city_id: e.currentTarget.dataset.city_id }
that.bindCityss(hha)
},
//选择城市2
bindCityss: function (e) {
var that = this;
let params = { addr_id: e }
getAreaList(params).then(res => {
if (res.code == 0) {
that.setData({
countyList: res.data,
showDialog: !this.data.showDialog
})
}
});
},
// 选择县
Selectfun(e) {
var that = this;
let hha = e.currentTarget.dataset.addr_id;
let params = { addr_id: hha }
getAreaList(params).then(res => {
if (res.code == 0) {
that.setData({
countyList: res.data,
showDialog: !this.data.showDialog,
current_city_name: res.data[0].name,
current_city_id: res.data[0].city_id,
})
app.globalData.myLatitude = res.data[0].lat;
app.globalData.myLongitude = res.data[0].lng;
wx.setStorageSync("city_id", res.data[0].city_id);
wx.setStorageSync("myCity", res.data[0].name);
wx.setStorageSync("addr_id", res.data[0].addr_id);
wx.setStorageSync("change_city", 1);
// 存储定位记录
let locationlog = wx.getStorageSync("locationlog");
let locationArr = [];
if (locationlog) {
//之前有
locationArr = [...locationlog, res.data[0]]
} else {
//之前没有
locationArr = [res.data[0]]
}
//去重~
var obj = {};
locationArr = locationArr.reduce(function (item, next) {
obj[next.city_id] ? '' : obj[next.city_id] = true && item.push(next);
return item;
}, []);
wx.setStorageSync("locationlog", locationArr)
wx.navigateBack();
}
});
console.log(e, '哈哈sfdsfdsfsd')
},
// 关闭弹窗
close() {
this.setData({
showDialog: !this.data.showDialog
})
},
//点击热门城市回到顶部
hotCity: function () {
this.setData({
scrollTop: 0,
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "切换城市"
}
\ No newline at end of file
<!-- 搜索框 -->
<view class='list-search'>
<view class='list-search-box'>
<icon type="search" size="15" />
<input placeholder="输入您要搜索的城市" bindinput='searchInput' />
</view>
<button class='search-button' bindtap='search'>搜索</button>
</view>
<view>
</view>
<view class="searchLetter touchClass">
<!-- <view class="thishotText" bindtap="hotCity">
<view style="margin-top:0;">当前</view>
<view style="margin-top:0;">热门</view>
</view> -->
<view wx:for="{{searchLetter}}" style="color:#2ab4ff;font-size:20rpx;" wx:key="index" data-letter="{{item.name}}"
catchtouchend="clickLetter">{{item.name}}</view>
</view>
<block wx:if="{{isShowLetter}}">
<view class="showSlectedLetter">
{{showLetter}}
</view>
</block>
<scroll-view scroll-y="true" style="height:{{winHeight}}px;background:#fff;" bindscroll="bindScroll"
scroll-into-view="{{scrollTopId}}" scroll-top="{{scrollTop}}">
<view class="hotcity-common thisCity">当前选择城市</view>
<view class="thisCityName" bindtap="bindCity" data-city_id="{{current_city_id}}">{{current_city_name}}</view>
<view class="item_letter" wx:if="{{locationlog.length>1}}"></view>
<view class="locationlogs" wx:if="{{locationlog.length>1}}">
<view class="logstit">定位/最近访问</view>
<view class="flex flex-wrap">
<view>
<view class="thisCityName thisCityNametwo flex ali-c" bindtap="bindCity" :data-city_id="current_city_id">
<image style="width: 20rpx;height: 26rpx;margin-right:5rpx;" src="/images/dingwei.png" mode=""></image>
<text>{{current_city_name}}</text>
</view>
</view>
<view wx:for="{{locationlog}}" wx:key="index">
<view wx:if="{{current_city_name!=item.name}}" class="thisCityName thisCityNametwo on" data-addr_id="{{item.addr_id}}"
data-city="{{item.name}}" bindtap="Selectfun">{{item.name}}</view>
</view>
</view>
</view>
<!-- <view>
<text class="hotcity hotcity-common">热门城市</text>
<view class="weui-grids">
<block wx:for-items="{{hotcityList}}" wx:key="index">
<view class="weui-grid" data-city_id="{{item.city_id}}" data-city="{{item.name}}" bindtap="bindCity" >
<view class="weui-grid__label">{{item.name}}</view>
</view>
</block>
</view>
</view> -->
<view class="selection" wx:for="{{cityList}}" wx:key="index">
<view class="item_letter" id="{{index}}">{{index}}</view>
<view class="item_city" wx:for="{{item}}" wx:for-item="ct" wx:key="city_id" data-addr_id="{{ct.addr_id}}"
data-city_id="{{ct.city_id}}" data-city="{{ct.name}}" bindtap="bindCitys">
{{ct.name}}
</view>
</view>
</scroll-view>
<!-- 弹窗 -->
<view class="zan-dialog {{ showDialog ? 'zan-dialog--show' : '' }}">
<!-- 如果想点击弹窗外不隐藏,取消bindtap点击事件即可 -->
<view class="zan-dialog__mask" bindtap="close" />
<view class="zan-dialog__container">
<view class="popupbox ali-c">
<view class="popupimg">
<view class="item_city_zi beijingh mb-20">
<!-- <view class="" wx:for="{{countyList}}" wx:key='index'>
{{item.name}}
</view> -->
<view class="ali-c ds-fw">
<block wx:for-items="{{countyList}}" wx:key="index">
<view class="xianji" data-addr_id="{{item.addr_id}}" data-city="{{item.name}}" bindtap="Selectfun">
<view class="weui-grid__label">{{item.name}}</view>
</view>
</block>
</view>
</view>
<view style="width: 100%;" class="jus-c" bindtap="close">
<!-- <image class="guanbi" src="{{clientImgPath}}/images/taobao/guanbi.png" mode=""></image> -->
<image class="guanbi" src="{{clientImgPath}}/images/images/colse.png" mode=""></image>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
page{
background-color:#ffffff;
}
.searchLetter {
position: fixed;
right: 0;
width: 50rpx;
text-align: center;
justify-content: center;
display: flex;
flex-direction: column;
color: #666;
z-index: 1;
}
.searchLetter view {
margin-top: 20rpx;
color: #999999 !important ;
}
.touchClass {
background-color: #fff;
color: #fff;
padding-top: 91rpx;
}
.showSlectedLetter {
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 50%;
left: 50%;
margin: -100rpx;
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
font-size: 52rpx;
z-index: 1;
}
.selection {
display: flex;
width: 100%;
flex-direction: column;
margin: 0rpx 0 0;
}
.item_letter {
display: flex;
background-color: #f5f5f5;
height: 40rpx;
padding-left: 34rpx;
align-items: center;
font-size: 28rpx;
color: #666;
}
.item_city {
display: flex;
background-color: #fff;
height: 100rpx;
padding-left: 34rpx;
align-items: center;
border-bottom: 1rpx solid #ededed;
font-size: 28rpx;
color: #666;
}
.hotcity-common {
font-size: 28rpx;
color: #666;
padding: 0 0 0 30rpx;
}
.thisCity {
padding-top: 100rpx;
}
.thisCityName {
display: inline-block;
border: 1rpx solid #f64f15;
border-radius: 8rpx;
padding: 10rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #f64f15;
text-align: center;
min-width: 149.5rpx;
margin: 20rpx 0 20rpx 30rpx;
}
.thishotText {
color: #999999;
font-size: 20rpx;
margin: 0 !important;
}
.slectCity {
border-color: #999999 !important;
}
.slectCity view {
color: #999999 !important;
}
.weui-grid {
position: relative;
float: left;
padding: 10rpx 0;
width: 149.5rpx;
box-sizing: border-box;
border: 1rpx solid #ececec;
border-radius: 8rpx;
margin: 10rpx 12rpx 20rpx;
}
.weui-grid__label {
display: block;
text-align: center;
color: #333;
font-size: 28rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.list-search {
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
width: 100%;
height: 90rpx;
padding: 10rpx 30rpx;
box-sizing: border-box;
z-index: 20;
background: #FFF;
border-bottom:1px #f5f5f5 solid;
}
.search-title {
flex-shrink: 0;
font-size: 28rpx;
padding-right: 10rpx;
}
.list-search-box {
display: flex;
align-items: center;
padding: 0 30rpx;
width: 100%;
height: 70rpx;
background: #f5f5f5;
border-radius: 90rpx;
font-size: 28rpx;
box-sizing: border-box;
}
.list-search-box input {
width: 100%;
padding-left: 10rpx;
}
.search-button {
/* width: 100rpx; */
flex-shrink: 0;
height: 60rpx;
line-height: 60rpx;
font-size: 28rpx;
margin-left: 10rpx;
}
button::after{
border: none;
padding: 0
}
/* 热门城市横排显示样式 */
.list-horizontal {
display: flex;
flex-wrap: wrap;
padding: 10rpx;
padding-right: 50rpx;
}
.list-horizontal .list-name {
padding: 5rpx 20rpx;
border: 1px #ccc solid;
border-radius: 10rpx;
margin: 10rpx;
/* margin-right: 20rpx; */
}
.fiexed-box {
position: absolute;
top: 90rpx;
z-index: 19;
width: 100%;
/* background: #ddd; */
}
.item_city_zi{
padding: 20rpx;
box-sizing: border-box;
}
/* 弹窗 */
.popupbox{
width: 100%;
height: 100vh;
}
.popupimg{
width: 100%;
padding: 0 24rpx;
box-sizing: border-box;
}
.guanbi{
width: 72rpx;
height: 72rpx;
}
.zan-dialog__mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0.4);
display: none;
}
.zan-dialog__container {
position: fixed;
top: 0;
width: 100%;
height: 100vh;
/* background: #f8f8f8; */
transform: translateY(300%);
transition: all 0.4s ease;
z-index: 12;
/* border-radius: 20rpx; */
/* box-shadow: 0px 3px 3px 2px gainsboro; */
}
.zan-dialog--show .zan-dialog__container {
transform: translateY(0);
}
.zan-dialog--show .zan-dialog__mask {
display: block;
}
.beijingh{
flex: 1;
background-color: #ffffff;
min-height: 400rpx;
max-height: 600rpx;
overflow-x: hidden;
border-radius: 15rpx;
}
.xianji{
padding: 10rpx 0;
width: 149.5rpx;
box-sizing: border-box;
border: 1rpx solid #ececec;
border-radius: 8rpx;
margin: 10rpx 8rpx 20rpx;
}
.locationlogs{
padding-right: 50rpx;
}
.locationlogs .logstit{
font-size: 28rpx;
color: #666;
padding: 20rpx 0 20rpx 30rpx;
}
.locationlogs .thisCityName{
display: flex;
align-items: center;
justify-content: center;
}
.thisCityNametwo.on{
color: #a7a6ab;
border: 1px solid #a7a6ab;
}
\ No newline at end of file
// pages/personal/agreement/agreement.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": {},
"navigationBarTitleText": "隐私政策"
}
\ No newline at end of file
<!--pages/personal/agreement/agreement.wxml-->
<view class="Agreement yicode">
<view class="contenxtext">本软件尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、更有个性化的服务,本软件会按照本隐私权政策的规定使用和披露您的个人信息。但本软件将以高度的勤勉、审慎义务对待这些信息。除本隐私权政策另有规定外,在未征得您事先许可的情况下,本软件不会将这些信息对外披露或向第三方提供。本软件会不时更新本隐私权政策。您在同意本软件服务使用协议之时,即视为您已经同意本隐私权政策全部内容。本隐私权政策属于本软件服务使用协议不可分割的一部分。</view>
<view class="cententext">1.适用范围</view>
<view class="contowtext">a)在您使用本软件网络服务,本软件自动接收并记录的您的手机上的信息,包括但不限于您的健康数据、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据;</view>
<view class="cententext">2.信息的使用</view>
<view class="contowtext">a)在获得您的数据之后,本软件会将其上传至服务器,以生成您的排行榜数据,以便您能够更好地使用服务。</view>
<view class="cententext">3.信息披露</view>
<view class="contowtext">a)本软件不会将您的信息披露给不受信任的第三方。</view>
<view class="contowtext">b)根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政、司法机构披露;</view>
<view class="contowtext">c)如您出现违反中国有关法律、法规或者相关规则的情况,需要向第三方披露;</view>
<view class="cententext">4.信息存储和交换</view>
<view class="contowtext">本软件收集的有关您的信息和资料将保存在本软件及(或)其关联公司的服务器上,这些信息和资料可能传送至您所在国家、地区或本软件收集信息和资料所在地的境外并在境外被访问、存储和展示。</view>
<view class="cententext">5.信息安全</view>
<view class="contowtext">a)在使用本软件网络服务进行网上交易时,您不可避免的要向交易对方或潜在的交易对方披露自己的个人信息,如联络方式或者邮政地址。请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密,请您立即联络本软件客服,以便本软件采取相应措施。</view>
<view class="cententext">6.我们会出于以下目的,收集和使用您的信息:</view>
<view class="contowtext">a)为便于我们为您提供服务,您需要提供基本注册信息,例如手机号码、电子邮箱地址等,并创建您的用户名和密码。</view>
<view class="contowtext">b)我们所收集和使用的信息是为您提供服务的必要条件,如缺少相关信息,我们将无法为您提供服务的核心内容。</view>
<view class="contowtext">c)为您展示和推送商品或服务。我们可能使用您的信息,您的浏览及搜索记录、设备信息、位置信息、订单信息,提取您的浏览、搜索偏好、行为习惯、位置信息等特征,并基于特征标签通过电子邮件、短信或其他方式向您发送营销信息,提供或推广我们或第三方的如下商品和服务。</view>
<view class="contowtext">d)向您发出通知。我们可能在必需时(例如当我们由于系统维护而暂停某一单项服务、变更、终止提供某一单项服务时)向您发出与服务有关的通知。</view>
</view>
/* pages/personal/agreement/agreement.wxss */
page{
background-color: #fff !important;
}
.Agreement{
padding: 24rpx;
}
.Agreement .contenxtext{
font-size: 30rpx;
margin-bottom: 10rpx;
}
.Agreement .cententext{
font-size: 28rpx;
margin-bottom: 10rpx;
}
.Agreement .contowtext{
font-size: 26rpx;
margin-bottom: 10rpx;
}
\ No newline at end of file
// pages/personal/agreementuser/agreementuser.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": {},
"navigationBarTitleText": "用户协议"
}
\ No newline at end of file
<!--pages/personal/agreementuser/agreementuser.wxml-->
<!-- 用户协议 -->
<!-- 协议 -->
<view class="Agreement yicode">
<view class="cententext">用户许可及使用协议</view>
<view class="contowtext">尊敬的用户您好:</view>
<view class="cententext">本协议是用户(或称“您”)与江西多思盈信息科技有限公司(下称“公司”或“我们”)之间由江西多思盈信息科技有限公司开发并向用户提供的应用程序(以下简称“本应用”或“应用程序”)使用、更新的法律协议。</view>
<view class="contowtext">在您使用本应用之前,请您务必认真阅读和理解《用户许可及使用协议》(以下简称“本协议”或“协议”)中规定的所有条款,特别是免除或者限制责任的条款、争议解决和法律适用条款,免除或者限制责任的条款可能将以加粗字体显示,您应重点阅读。您在经阅读后可以选择接受或不接受本协议项下所有条款(未成年人应在法定监护人陪同下阅读),如您实际使用我们提供的应用程序,即表示您已充分阅读、理解并接受本协议的全部内容,并与我们达成协议。</view>
<view class="cententext">一、应用程序的许可使用</view>
<view class="contowtext">(一)在遵守本协议项下所有条款的前提下,您可以于应用程序承载设备上以有限的、非独家的方式使用本应用,不得复制、出售、转让或是用于其他任何商业用途。</view>
<view class="contowtext">(二)除非另有我们书面的明示许可,您同意不得且不会促使其他任何个人、竞品公司或其他组织对本应用进行拆解、复制、反向工程、反向编译、反汇编亦或创作预置软件的衍生作品。同样,对于本应用中的源代码,您同意不得且不会促使其他任何人进行或试图包括但不限于导出、解码、修改或其他有损本应用的行为。</view>
<view class="contowtext">(三)您同意不会出租、出借、再分发亦或是再许可本应用给任何第三方。但您可就本应用智能终端载体所有权的合法转让,而将您根据本协议对本应用的使用许可一次性且永久转让给另一方。</view>
<view class="contowtext">(四)您同意不使用本应用相关更新内容从事以下行为:</view>
<view class="contowtext">1、在本协议授权使用的范围之外使用、复制或转让本应用的全部或部分内容;</view>
<view class="contowtext">2、在没有公司书面许可的前提下,提供第三方、或允许第三方使用本应用的全部或部分(包括但不局限于本应用下运营的代码、源代码及相关服务等);</view>
<view class="contowtext">3、以欺骗性目的或是以欺骗性方式使用本应用;</view>
<view class="contowtext">4、删除本应用内包含的任何一个使用版权声明或提示;</view>
<view class="contowtext">5、作废、改变、破坏或逃避与本应用相关的或者属于本应用组成的全部或部分数字版权管理部分;</view>
<view class="contowtext">6、其他不当或违反法律法规、行业规定的行为。</view>
<view class="cententext">五)您在使用本应用进行存储或复制素材或材料时,您需要取得相关权利人的合法授权。本应用提供的素材或材料的复制功能仅限于复制没有相关版权保护的素材或材料,对于有版权保护的素材或材料是受著作权法或其他知识产权法律和条约的保护,并需要遵守材料或素材提供放的使用协议或相关条款。除另有约定,本协议的授权无法包含此等素材或材料,亦无法保证您可继续正常使用该类材料,我们无法关于此类状况承担法律责任。)</view>
<view class="cententext">二、隐私政策</view>
<view class="cententext">《个人隐私保护政策》(以下简称“隐私政策”)提供了与本应用收集的数据以及我们使用这些数据的方式相关的信息。当您在设备上使用本应用时,我们将依据本协议和隐私政策的规定从您的终端设备上收集相关数据,隐私政策与本协议有同等法律效力且为不可分割的一部分。</view>
<view class="cententext">三、使用规范</view>
<view class="contowtext">(一) 信息发布规范</view>
<view class="contowtext">1、您可以使用本应用发表与上传信息,该信息内容应保证具有相应的知识产权或其已获得合法的授权,且使用本应用以及相关服务的任何行为未侵犯任何第三方的合法权益。</view>
<view class="contowtext">2、您在使用本应用时不得从事以下行为,包括但不限于:制作、复制、发布、传播或储存违反国家法律法规的内容,从事以下述行为:</view>
<view class="contowtext">(1)反对宪法所确定的基本原则的;</view>
<view class="contowtext">(2)危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;</view>
<view class="contowtext">(3)损害国家荣誉和利益的;</view>
<view class="contowtext">(4)煽动民族仇恨、民族歧视,破坏民族团结的;</view>
<view class="contowtext">(5)破坏国家宗教政策,宣扬邪教和封建迷信的;</view>
<view class="contowtext">(6)散布谣言,扰乱社会秩序,破坏社会稳定的;</view>
<view class="contowtext">(7)散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;</view>
<view class="contowtext">(8)侮辱或者诽谤他人,侵害他人合法权益的;</view>
<view class="contowtext">(9)煽动非法集会、结社、游行、示威、聚众扰乱社会秩序;</view>
<view class="contowtext">(10)以非法民间组织名义活动的;</view>
<view class="contowtext">(11)含有法律、行政法规禁止的其他内容的;</view>
<view class="contowtext">(12)发布、传送、传播、储存侵害他人名誉权、肖像权、知识产权、商业秘密等合法权利的内容;</view>
<view class="contowtext">(13)虚构事实、隐瞒真相以误导、欺骗他人;</view>
<view class="contowtext">(14)发表、传送、传播广告信息及垃圾信息;</view>
<view class="contowtext">(15)从事其他违反国家法律法规的其他行为。</view>
<view class="cententext">(二) 用户理解并同意:</view>
<view class="contowtext">1、我们会对您的使用行为是否违反上述规范行为进行认定,并依据认定结果对您采取中止或终止的限制使用措施;</view>
<view class="contowtext">2、对于您使用本应用时发布的涉嫌违法、涉嫌侵犯他人合法权益或违反本协议约定的信息,我们将直接删除;</view>
<view class="contowtext">3、若您违反上述使用规范的行为并对第三方造成损害,您需以个人名义独立承担相关的法律责任,若因此使我们遭受损失、受到第三方的索赔亦或是受到行政管理机关处罚,我们有权对此类的损失以及产生相关合理费用(如律师费、诉讼费等)要求您进行赔偿。</view>
<view class="cententext">四、第三方软件服务说明</view>
<view class="contowtext">(一)您理解并同意,本应用中可能包含由关联方或第三方合作伙伴提供的软件及相关服务,我们仅为您提供更加便捷的操作而在本应用中提供相关功能,或是提供第三方软件以及相关服务的使用入口,您在使用该软件或是服务的同时须遵守该方的用户协议及隐私政策。</view>
<view class="contowtext">(二)若您与第三方软件或是服务的提供方之间发生的任何争议、纠纷,您可与该方依照其许可协议自行协商解决或进入法律程序,我们无法承担任何责任。</view>
<view class="cententext">五、使用风险及免责声明</view>
<view class="contowtext">(一)以目前我们技术所提供的服务支持,无法完全保证本应用服务在操作中不发生任何错误或是临时中断,亦无法保证本应用能充分满足您的所有要求,我们无法承担此类状况的全部法律责任。</view>
<view class="contowtext">(二)若您因第三方问题如技术、通讯、网络、手机终端设备故障以及其他不可抗力原因而遭受的一切损失,我们以及相关合作方无法承担该类责任,就该部分损失您可向第三方主张赔偿。</view>
<view class="contowtext">(三)本应用所涉及的内容仅为便利您的使用供您参考使用,不论从何种角度看均不代表我们的言论,亦不足以构成我们对任何专业领域的建议。若您需要解决相关具体问题,还请咨询相关领域的专业人士。</view>
<view class="contowtext">(四)我们无法保证通过本应用所获得的第三方所提供的内容的合规性、合法性、真实性、准确性,我们仅能于法律法规的规定下,对此类信息内容实施监督和管理。</view>
<view class="contowtext">(五)本应用与大多数互联网公司提供的应用软件服务是类似的,受包括但不限于通讯环境、网络服务质量、社会环境、第三方资料获取等因素的影响,可能受到各种安全问题的侵扰,您需要加强信息安全的自我保护意识,要注意加强密码保护,以免遭受损失。</view>
<view class="contowtext">(六)因您需要我们提供定制服务时,本应用的相关服务可能会使用第三方软件的相关服务支持您的使用,该结果由服务方提供,因此您除了需要遵守本协议项下的条款下,还应遵守第三方的协议以及相关使用规则。您须理解并同意,在使用第三方服务时,您的使用数据会被第三方读取,我们无法保证通过第三方软件产生结果的安全性、准确性、有效性,亦无法对其他未知风险作出保证,您需要审慎判断,若因此引发的任何争议及损害,我们无法承担该类责任。</view>
<view class="contowtext">(七) 若您因以下情况所引发的有关人身伤害或者是直接的、间接的经济损害赔偿,包括但不限于金钱损失、业务中断的相关损害赔偿或者是其他的损害赔偿,还需您自行承担:</view>
<view class="contowtext">1、使用未被许可授权的软件;</view>
<view class="contowtext">2、您对第三方软件的错误使用;</view>
<view class="contowtext">3、非因本应用的原因引起的其他损失。</view>
<view class="contowtext">(八)您知晓且同意我们有权基于司法、监管部门、监督机构的要求,暂停、中断或者是终止向您提供全部或者部分相关服务,对此我们无法承担该类责任。</view>
<view class="contowtext">(九)您同意并理解,我们将会尽技术及商业中最大努力保障您在本应用中的数据存储安全,您须理解,我们无法对第三方、用户个人原因或是不可抗力原因产生的数据删除、储存、备份的失败承担责任。</view>
<view class="cententext">六、知识产权声明</view>
<view class="contowtext">(一)除第三方产品或服务外,本应用中所有内容,包括但不限于著作、图片、档案、资讯、资料、架构、页面设计,均由本公司或本公司关联公司依法拥有其知识产权,包括但不限于商标权、专利权、著作权、商业秘密等。</view>
<view class="contowtext">(二)您理解并知晓非经我们的书面同意,任何人不得擅自使用、修改、复制、公开传播、改变、散布、发行或公开发表本应用上程序或内容。</view>
<view class="contowtext">(三)尊重知识产权是我们与您应尽的义务,如有违反,双方依据法律规定各自承担风险及责任。</view>
<view class="cententext">七、未成年人使用条款</view>
<view class="contowtext">若您未达国家法定年龄的未成年人,应在监护人监护、指导并获得监护人同意情况下阅读本协议和使用本应用。青少年使用本应用应在合理范围内正确合理的使用网络,养成良好上网习惯,遵守《全国青少年网络文明公约》。</view>
<view class="cententext">八、法律适用与管辖</view>
<view class="contowtext">本协议之效力、解释、变更、执行与争议解决均适用中华人民共和国法律,如无相关法律规定的,则应参照通用国际商业惯例和(或)行业惯例。</view>
<view class="cententext">九、其他</view>
<view class="contowtext">(一)我们的用户协议在国家法律、法规、规章及制度变更或是公司业务方向作调整以及其他必要的前提条件下可能进行变更或修改。未经您明确同意,我们不会限制您按照本用户协议所应享有的权利。</view>
<view class="contowtext">对于本用户协议的重大变更或修改,我们还会提供显著的通知(例如,在应用版本升级或您重新登录时,以弹窗形式对您进行及时通知)。本政策所指的重大变更包括但不限于:我们的服务模式发生重大变化;我们在控制权等方面发生重大变化,如并购重组等引起的所有者变更等;法律法规的修改或是其他同类事项。</view>
<view class="contowtext">(二)关于个性化广告推送:给予您优质的用户体验是我们一直坚守的原则,因此我们拒绝了众多恶意广告、骚扰广告,并期望根据您的喜好为您提供更多实用的广告内容。同时,我们了解有些用户不希望收到依其兴趣或浏览记录投放显示的广告。您可以通过手机系统设置(设置-权限管理-应用权限管理)关闭本应用对于位置信息的收集。如您拒绝提供位置信息仅会使您无法享受基于位置的广告推荐,不会影响您正常使用本款产品的其他功能。</view>
<view class="contowtext">(三)本协议的所有标题仅是为了醒目及阅读方便,本身并没有实际涵义,不能作为解释本协议涵义的依据。</view>
<view class="contowtext">(四)我们与关联方均享有、保留对应用的所有权利和使用的资格,并保留本协议内未明确授予您的其他权利。</view>
<view class="contowtext">(五)本协议各条款无论因何种原因部分无效或不可执行,其余条款仍有效,对双方均具有约束力。</view>
</view>
/* pages/personal/agreementuser/agreementuser.wxss */
page{
background-color: #fff !important;
}
.Agreement{
padding: 24rpx;
}
.Agreement .contenxtext{
font-size: 30rpx;
margin-bottom: 10rpx;
}
.Agreement .cententext{
font-size: 28rpx;
margin-bottom: 10rpx;
}
.Agreement .contowtext{
font-size: 26rpx;
margin-bottom: 10rpx;
}
\ No newline at end of file
// pages/personal//coupons/coupons.js
const app = getApp();
import {getUserInfo, my_coupons, del_coupons} from '../../../api/user.js';
import { shopType, hotelId } from '../../../api/shop.js';
import Util from '../../../utils/util.js';
import luma from '../../../utils/luma.js';
var clientImgPath = app.globalData.clientImgPath;
var img_host = app.globalData.ImgPath;
Page({
/**
* 页面的初始数据
*/
data: {
arr:['hh','aa','bb'],
hiddenName:true,
currentTab: 0,
currentIndex: 0,
hidden: true,
currentTab_1: 0,
currentIndex: 0,
pageNum: 0,
is_loading_done: false, //是否显示加载完,默认没有加载完
couponlist: [],
clientImgPath: clientImgPath,
genre:1,
coupons:[],
hidden:false,//授权弹窗是否显示
},
getCoupon:function(data){
console.info(data)
var shopid = data.detail.shop_id;
var goods_id = data.detail.goods_id;
var couponid = data.detail.id;
shopType(shopid).then(res => {
if (res.code == 0) {
if (res.data == 'ele') {
if(goods_id!=null){
console.info(1)
wx.navigateTo({
url: '/pages/shop/shops/ele/ele_details/ele_details?product_id=' + goods_id+ '&shop_id=' + shopid ,
})
}else{
console.info(2)
wx.navigateTo({
url: '/pages/shop/shops/ele/ele?shop_id=' + shopid+ '&couponid=' + couponid,
})
}
} else if (res.data == 'weidian') {
if(goods_id!=null){
console.info(goods_id,3)
wx.navigateTo({
url: '/pages/shop/shops/weidian/weidian_details/weidian_details?goods_id=' + goods_id+ '&couponid=' + couponid ,
})
}else {
console.info(4)
wx.navigateTo({
url: '/pages/shop/shops/weidian/home_page_weidian/home_page_weidian?shop_id=' + shopid+ '&couponid=' + couponid ,
})
}
} else {
hotelId(shopid).then(res => {
if (res.code == 0) {
wx.navigateTo({
url: '/pages/shop/hotel/hotel_details/hotel_details?hotel_id=' + res.data + '&couponid=' + couponid,
})
}
})
}
}
})
},
bindButtonTap() {
this.setData({
focus: true,
hidden: false
})
},
onbindblur() {
this.setData({
hidden: true
})
},
//点击切换
clickTab: function (e) {
var that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.data.pageNum=0;
that.data.couponlist=[];
that.data.coupons = [];
that.setData({
currentTab: e.target.dataset.current,
couponList: that.data.couponlist,
coupons: that.data.coupons,
pageNum: that.data.pageNum,
})
}
that.initializedata(that.data.genre);
},
//点击切换
clickTab_1: function (e) {
var that = this;
console.log(e.target.dataset.current)
if (this.data.currentTab_1 === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab_1: e.target.dataset.current,
})
}
if (that.data.currentTab_1==0){
that.data.genre = 1
that.data.couponlist = [];
that.data.coupons = [];
that.data.pageNum = 0;
that.setData({
couponList: that.data.couponlist,
coupons: that.data.coupons,
pageNum: that.data.pageNum,
})
that.initializedata(1);
}else{
that.data.genre = 0
that.data.couponlist = [];
that.data.coupons = [];
that.data.pageNum = 0;
that.setData({
couponList: that.data.couponlist,
coupons: that.data.coupons,
pageNum: that.data.pageNum,
})
that.initializedata(0);
}
},
setUserInfo(e){ //点击了授权
if(e.detail){
this.initializedata();
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(options.currentTab){
this.setData({
currentTab:options.currentTab,
currentTab_1:options.shop_id==3140?0:1,
genre:options.shop_id==3140?1:0,
})
}
if( !wx.getStorageSync('userInfo') ){
this.setData({ hidden:true });
return;
}
this.setData({ hidden:false });
this.initializedata(this.data.genre);
},
//初始化数据
initializedata: function (genre=1) {
this.data.is_loading_done= false;
var that = this;
var page = that.data.pageNum;
if (that.data.currentTab == 0) {
that.my_coupons(0, page, genre);
} else if (that.data.currentTab == 1) {
that.my_coupons(1, page, genre);
} else if (that.data.currentTab == 2){
that.my_coupons(2, page, genre)
}
},
my_coupons(type, page, genre=1){
var that = this;
my_coupons(type, page, genre).then(res => {
if (res.code == 0) {
console.log(res.data)
if (res.data==null){
that.setData({
is_loading_done: true,
})
}else{
if(that.data.genre==0){
var coupon_list = that.data.couponlist;
coupon_list = coupon_list.concat(res.data);
coupon_list.map((item, index)=>{
item.isshowall = false;
return item;
})
that.data.couponlist = coupon_list;
that.setData({
couponList: coupon_list,
})
}else{
var coupons = that.data.coupons;
coupons = coupons.concat(res.data);
that.data.coupons = coupons;
that.setData({
coupons: coupons,
})
}
}
wx.hideLoading();
}
}).catch(err=>{
if( res.data.code == -10800 ){
that.setData({ hidden:true });
}
})
},
deleteCoupons:function(e){
var that = this
var coupons_id = e.currentTarget.dataset['id'];
del_coupons(coupons_id).then(res=>{
console.log(res.data)
if(res.code==0){
wx.showToast({
title: res.msg,
duration: 2000,
})
that.data.pageNum=0;
that.initializedata(that.data.genre);
that.onload()
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getUserInfo()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 获取
*/
getUserInfo(){
console.log(111111111);
let params = {};
getUserInfo(params).then(res => {
console.log(res.data)
if(res.code==0){
getApp().globalData.userInfo = res.data.info;
var user_id = res.data.info.user_id;
// wx.setStorageSync('user_id', user_id);
wx.setStorageSync('userInfo', res.data);
wx.setStorageSync('user_id', res.data.info.user_id);
this.setData({
member: getApp().globalData.userInfo,
personal: res.data
})
// this.getLuckDrawListFun()
}
})
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
loadmore: function () {
var that = this;
var pageNum = that.data.pageNum;
that.setData({
pageNum: pageNum + 1
})
that.initializedata(that.data.genre);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
var that = this;
var is_loading_done = that.data.is_loading_done; //是否加载完毕
if (is_loading_done == false) { //还没加载完毕则继续加载
wx.showLoading({
title: '加载中',
mask: false
})
that.loadmore();
} else {
wx.showLoading({
title: '已全部加载完毕',
mask: false
})
setTimeout(function () {
wx.hideLoading()
}, 1000)
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
})
\ No newline at end of file
{
"navigationBarTitleText": "我的卡券",
"usingComponents": {
"CouponsGroup": "../../../components/CouponsGroup/CouponsGroup"
}
}
\ No newline at end of file
<!--pages/personal//coupons/coupons.wxml-->
<!-- tab -->
<view class='tab_wrap fu_top'>
<view class="swiper-tab-items {{currentTab==0?'activezi':''}}" data-current="0" bindtap="clickTab">未使用</view>
<view class="swiper-tab-items {{currentTab==1?'activezi':''}}" data-current="1" bindtap="clickTab">已使用</view>
<view class="swiper-tab-items {{currentTab==2?'activezi':''}}" data-current="2" bindtap="clickTab">已过期</view>
</view>
<view class="{{currentTab == 0 ? 'show':'hidden'}}">
<view class='tab_wrap fu_top xian_t'>
<view style="width:50%" class="swiper-tab-ss {{currentTab_1==0?'actives':''}}" data-current="0" bindtap="clickTab_1">鹿马优选优惠券</view>
<view class="tapshuxian"></view>
<view style="width:50%" class="swiper-tab-ss {{currentTab_1==1?'actives':''}}" data-current="1" bindtap="clickTab_1">其它店铺优惠券</view>
</view>
<view class="{{currentTab_1 == 0 ? 'show':'hidden'}}">
<view class="kaj_box">
<!-- 无数据显示图片 -->
<view class="meiyous" wx:if='{{coupons.length==0}}'>
<image src="{{clientImgPath}}/images/uts/meiyoule.png"></image>
</view>
<!-- s -->
<view class="kaj_zi" wx:if='{{coupons.length!=0}}'>
<!-- 新的 卡券组-->
<CouponsGroup coupons='{{coupons}}' currentTab='{{currentTab_1}}' bind:getCoupon="getCoupon" currentTabs='{{currentTab}}'/>
</view>
</view>
</view>
<view class="{{currentTab_1 == 1 ? 'show':'hidden'}}">
<view class="kaj_box">
<!-- 无数据显示图片 -->
<view class="meiyous" wx:if='{{couponList.length==0}}'>
<image src="{{clientImgPath}}/images/uts/meiyoule.png"></image>
</view>
<!-- s -->
<view class="kaj_zi" wx:if='{{couponList.length!=0}}'>
<!-- 新的 卡券组-->
<CouponsGroup coupons='{{couponList}}' bind:getCoupon="getCoupon" currentTab='{{currentTab_1}}' currentTabs='{{currentTab}}' />
</view>
</view>
</view>
</view>
<view class="{{currentTab == 1 ? 'show':'hidden'}}">
<view class='tab_wrap fu_top xian_t'>
<view style="width:50%" class="swiper-tab-ss {{currentTab_1==0?'actives':''}}" data-current="0" bindtap="clickTab_1">鹿马优选优惠券</view>
<view class="tapshuxian"></view>
<view style="width:50%" class="swiper-tab-ss {{currentTab_1==1?'actives':''}}" data-current="1" bindtap="clickTab_1">其它店铺优惠券</view>
</view>
<view class="{{currentTab_1 == 0 ? 'show':'hidden'}}">
<view class="kaj_box">
<!-- 无数据显示图片 -->
<view class="meiyous" wx:if='{{coupons.length==0}}'>
<image src="{{clientImgPath}}/images/uts/meiyoule.png"></image>
</view>
<!-- s -->
<view class="kaj_zi" wx:if='{{coupons.length!=0}}'>
<!-- 新的 卡券组-->
<CouponsGroup coupons='{{coupons}}' currentTab='{{currentTab_1}}' bind:getCoupon="getCoupon" currentTabs='{{currentTab}}' />
</view>
</view>
</view>
<view class="{{currentTab_1 == 1 ? 'show':'hidden'}}">
<view class="kaj_box">
<!-- 无数据显示图片 -->
<view class="meiyous" wx:if='{{couponList.length==0}}'>
<image src="{{clientImgPath}}/images/uts/meiyoule.png"></image>
</view>
<!-- s -->
<view class="kaj_zi" wx:if='{{couponList.length!=0}}'>
<!-- 新的 卡券组-->
<CouponsGroup coupons='{{couponList}}' bind:getCoupon="getCoupon" currentTab='{{currentTab_1}}' currentTabs='{{currentTab}}' />
</view>
</view>
</view>
</view>
<view class="{{currentTab == 2 ? 'show':'hidden'}}">
<view class='tab_wrap fu_top xian_t'>
<view style="width:50%" class="swiper-tab-ss {{currentTab_1==0?'actives':''}}" data-current="0" bindtap="clickTab_1">鹿马优选优惠券</view>
<view class="tapshuxian"></view>
<view style="width:50%" class="swiper-tab-ss {{currentTab_1==1?'actives':''}}" data-current="1" bindtap="clickTab_1">其它店铺优惠券</view>
</view>
<view class="{{currentTab_1 == 0 ? 'show':'hidden'}}">
<view class="kaj_box">
<!-- 无数据显示图片 -->
<view class="meiyous" wx:if='{{coupons.length==0}}'>
<image src="{{clientImgPath}}/images/uts/meiyoule.png"></image>
</view>
<!-- s -->
<view class="kaj_zi" wx:if='{{coupons.length!=0}}'>
<!-- 新的 卡券组 过期卡券-->
<!-- <CouponsGroup currentTab='{{currentTab_1}}' coupons='{{coupons}}' bind:getCoupon="getCoupon" currentTabs='{{currentTab}}' /> -->
<!-- <view class="mab-30 kbox {{item.type==2||item.type==1?'huse':''}} " wx:for='{{coupons}}' wx:key='key'> -->
<view class="mab-30 kbox huse " wx:for='{{coupons}}' wx:key='key'>
<view bindlongpress="onDel" data-index="{{index}}" data-name="哈哈">
<view class="dsfle">
<view class="lezi">
<!-- 优惠券过期 -->
<view class="ysyong">
<image src="{{clientImgPath}}/images/images/yiguoqil.png"></image>
</view>
<!-- <view class="ysyong" wx:if='{{item.type==1}}'>
<image src="{{clientImgPath}}/images/images/yishiyong.png"></image>
</view> -->
<view class="dsfle-a">
<view class="juxing hong">商户</view>
<view class="mjtext">满{{item.at_least}}减{{item.money}}元</view>
</view>
<view class="xztext">仅限于{{item.shop_name}}店铺内使用</view>
<view class="dsfle-a s-30">
<view class="rqtext">有效期至 {{item.end_time}}</view>
<view class="xqbtn" bindtap="xiangqing" data-index='{{index}}'>详情</view>
</view>
</view>
<view class="rezi">
<view class="rh1">{{item.money}}元</view>
<view class="rh2">满{{item.at_least}}元使用</view>
<view class="rh3" bindtap='getCoupon' data-index="{{index}}" wx:if='{{item.type==0}}'>立即使用</view>
</view>
</view>
<view class="smtext {{bianlss==index?'back':'none'}} {{show?'back':'none'}}">
<view>使用说明:</view>
1.本券有效期至{{item.end_time}}。
2.本券每人限领1张,单笔订单限用1张且仅限移动端使用,不可叠加使用,不找零,不兑现。
3.如用券订单交易取消,券退回账户;如部分交易取消,券优惠按商品金额拆分。
4.商品固定余额部分不参与优惠。
5.若发现多笔订单中用户ID、收货人姓名、详细地址、联系方式及与用户身份相关的其他信息,任意一项或数项存在相同相似,或其他非真实有效等情形的,视为黄牛订单,鹿马108有权取消订单并不予发货。
<!-- 6.{{item.money}}元优惠券 -->
</view>
<!-- 优惠劵 -->
<view class="butt" hidden="{{!item.isshowall}}">
<!-- <view class="butt_1">取消</view> -->
<view class="butt_1" bindtap="handleLongPress" data-index="{{index}}">删除</view>
</view>
</view>
</view>
<!-- 新的 卡券组 过期卡券 /-->
</view>
</view>
</view>
<view class="{{currentTab_1 == 1 ? 'show':'hidden'}}">
<view class="kaj_box">
<!-- 无数据显示图片 -->
<view class="meiyous" wx:if='{{couponList.length==0}}'>
<image src="{{clientImgPath}}/images/uts/meiyoule.png"></image>
</view>
<!-- s -->
<view class="kaj_zi" wx:if='{{couponList.length!=0}}' wx:key="key">
<!-- 新的 卡券组-->
<CouponsGroup coupons='{{couponList}}' bind:getCoupon="getCoupon" currentTab='{{currentTab_1}}' currentTabs='{{currentTab}}' />
</view>
</view>
</view>
</view>
<!-- 登陆授权弹窗 -->
<login hidden="{{hidden}}" bind:setUserInfo="setUserInfo"/>
\ No newline at end of file
/* pages/personal//coupons/coupons.wxss */
page{
background: #F4F5FA;
}
/* tap */
.tab_wrap{
width: 100%;
height: 80rpx;
box-sizing: border-box;
padding: 0 55rpx;
overflow: hidden;
font-size: 28rpx;
display: flex;
align-items:center;
justify-content: space-between;
background: white;
}
.tab_wrap .activezi{
height: 55rpx;
text-align: center;
font-size:30rpx;
font-weight:bold;
line-height: 55rpx;
color:#f64f15;
border-bottom:4rpx solid #f64f15;
}
.actives{
height: 55rpx;
text-align: center;
font-size:30rpx;
font-weight:bold;
line-height: 55rpx;
color:#f64f15;
}
.swiper-tab-items{
height: 55rpx;
font-size:30rpx;
font-weight:bold;
line-height: 55rpx;
color: rgba(85,85,85,1);
text-align: center;
border-bottom:4rpx solid white;
}
.swiper-tab-ss{
height: 55rpx;
font-size:28rpx;
font-weight:bold;
line-height: 55rpx;
text-align: center;
}
.show{
display: block;
}
.hidden{
display: none;
}
.kjx_l_t_l_text{
font-size: 55rpx;
}
/* 内容 */
.kaj_box{
width: 100%;
padding: 20rpx 25rpx;
box-sizing: border-box;
}
.kjx_l_t_r{
}
.kjx_l_b_z{
width: 250rpx;
}
.kjx_l_t_box{
text-align: center;
}
.kjx_l_t_l{
width: 180rpx;
text-align: center;
}
.kjx_l_b_l{
width: 180rpx;
text-align: center;
}
.kaj_zi{
width: 100%;
/* background:rgba(255,255,255,1); */
/* border-radius:10rpx; */
/* padding: 20rpx 25rpx;
box-sizing: border-box; */
}
.kaj_zi_t{
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.kaj_zi_t_l{
overflow: hidden;
border-radius: 35rpx;
margin-right: 20rpx;
width:70rpx;
height:70rpx;
}
.kaj_zi_t_r{
width: 500rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
font-size:30rpx;
font-weight:800;
color:rgba(0,0,0,1);
}
.kjx_box{
width:100%;
height:138rpx;
position: relative;
margin-top: 15rpx;
}
.kjx_l_box{
width:100%;
height:100%;
display: flex;
align-items: center;
position: absolute;
}
.kjx_bjtu{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 0;
}
image{
width: 100%;
height: 100%;
display: block;
}
.kjx_l{
width: 588rpx;
padding: 25rpx 30rpx 25rpx 10rpx;
box-sizing: border-box;
}
.kjx_l_t{
display: flex;
justify-content: space-between;
align-items: center;
}
.kjx_l_t_l{
font-size:30rpx;
font-weight:800;
color:rgba(225,0,63,1);
}
.kjx_l_t_r{
width: 250rpx;
font-size:30rpx;
font-weight:bold;
color:rgba(51,51,51,1);
}
.kjx_l_b{
display: flex;
justify-content: space-between;
align-items: center;
font-size:20rpx;
font-weight:500;
color:rgba(153,153,153,1);
}
.kjx_l_b_r{
width:22rpx;
height:22rpx;
opacity:0.5;
}
.kjx_r{
width:35rpx;
font-size:24rpx;
line-height: 27rpx;
font-weight:bold;
color:#fff;
margin-left: 60rpx;
}
.kjx_rs{
width:35rpx;
font-size:24rpx;
line-height: 35rpx;
font-weight:bold;
color:rgba(51,51,51,1);
margin-left: 22rpx;
}
.xian_t{
border-top: 1px solid rgba(215,215,215,.5)
}
.kjx_rbox{
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
/* 过期卡券 css */
/* components/CouponsGroup/CouponsGroup.wxss */
/* 新的 */
.mab-30{
margin-bottom: 30rpx;
}
.dsfle{
display: flex;
}
.dsfle-a{
display: flex;align-items: center;
}
.lezi{
flex: 1;padding: 20rpx 20rpx 20rpx 0;box-sizing: border-box;position: relative;
}
.ysyong{
position: absolute;
width: 136rpx;
height: 136rpx;
right: -68rpx;
bottom: 50%;
z-index: 999;
margin-bottom: -68rpx;
}
.butt{
display: flex;
justify-content: flex-end;
/* margin: 0 20rpx 20rpx 0; */
margin-top: 20rpx;
}
.butt_1{
padding: 10rpx 35px 10rpx 35px;
/* border: 1rpx solid red; */
border-radius: 10rpx;
margin: 0 10rpx 20rpx 0;
background: #f64f15;
color:#ffffff;
font-weight: bold
}
.rezi{
width: 220rpx;padding: 20rpx 0;box-sizing: border-box;
position: relative;background-color: #f64f15;text-align: center;
}
.rezi::after{
content: '';
display: block;
width: 40px;
height: 100%;
/* height: 132px; */
background-size: 17px 11px;
background-repeat: repeat-y;
background-image: -o-radial-gradient(#fff 14rpx, transparent 14rpx);
background-image: -webkit-radial-gradient(#fff 14rpx, transparent 14rpx);
/* background-image: radial-gradient(#F5F2F2 8px, transparent 8px); */
position: absolute;
top:0;
left: -22rpx;
}
/* .byuan{
width: 20rpx;height: 20rpx;border-radius: 0 20rpx 20rpx 0;background-color: #fff;position: absolute;left: -10rpx;
} */
.juxing{
padding: 1px 2px;
font-size:24rpx;
font-weight:500;
color:rgba(255,255,255,1);
}
.kbox{
background:rgba(255,255,255,1);
border-radius:12rpx;overflow: hidden;padding: 0 0 0 20rpx ;
}
.hong{
background:rgba(242,45,71,1);
}
.mjtext{
font-size:36rpx;
font-weight:600;
color:rgba(26,26,26,1);margin-left: 10rpx;
}
.xztext{
font-size:24rpx;
font-weight:500;
color:rgba(179,179,179,1);margin-top: 15rpx;
}
.rqtext{
font-size:24rpx;
font-weight:500;
color:rgba(128,128,128,1);
}
.xqbtn{
margin-left: 20rpx;
padding: 1px 2px;
border:1px solid rgba(153,153,153,1);
border-radius:8rpx;
font-size:18rpx;
font-weight:500;
color:rgba(179,179,179,1);
}
.s-30{
margin-top: 30rpx;
}
.rh1{
font-size:48rpx;
font-weight:bold;
color:rgba(255,255,255,1);
}
.rh2{
font-size:20rpx;
font-weight:500;
color:rgba(255,255,255,1);
margin: 10rpx 0;
}
.rh3{
width:140rpx;
height:46rpx;
text-align: center;
background:rgba(255,255,255,1);
font-size:24rpx;
font-weight:400;
color:rgba(255,105,0,1);
line-height:46rpx;
margin: 0 auto;
}
.smtext{
margin: 20rpx 0;
font-size:17rpx;
font-weight:500;
color:rgba(51,51,51,1);
line-height:24rpx;
padding-right: 20rpx;
box-sizing: border-box;
}
.huse{
-webkit-filter: grayscale(100%);
}
.none{
display: none;
}
.back{
display: initial-back;
}
\ No newline at end of file
const app = getApp()
import { logisticsList, oneKeyShipments } from '../../../api/shop.js';
Page({
/**
* 页面的初始数据
*/
data: {
clientImgPath: app.globalData.clientImgPath,
selectData: [],
index:-1
},
bindPickerChange: function (e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
var index = e.detail.value
this.setData({
index: e.detail.value
})
console.log(index)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
var that=this;
that.setData({
order_id: options.order_id,
vendor_id:options.vendor_id
})
that.initializedata();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
//初始化数据
initializedata: function () {
var that=this;
let params = {};
logisticsList(params).then(res => {
that.setData({
selectData: res.data,
})
})
},
formSubmit:function(e){
var that=this;
console.log(that.data.vendor_id);
let params = {
order_id: that.data.order_id,
shipperName: that.data.selectData[that.data.index],
logisticCode: e.detail.value.logisticCode,
formId:e.detail.formId,
vendor_id:that.data.vendor_id
};
oneKeyShipments(params).then(res => {
if (res.code == 0) {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
success(res) {
wx.redirectTo({
url: '/pages/personal/Ishop/weidianLine_list_merchant/weidianLine_list_merchant'
})
}
})
}else {
app.showModal({
content: res.msg,
showCancel: false,
});
}
})
},
cancelShipments:function(){
wx.redirectTo({
url: '/pages/personal/Ishop/weidianLine_list_merchant/weidianLine_list_merchant'
})
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "快递发货"
}
\ No newline at end of file
<view class="boxs">
<form bindsubmit="formSubmit" report-submit="true">
<view class="topbox_20">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{selectData}}">
<view class="ali-z mt-10">
<view class="ali-c">
<view class="kuaiimg mr-40"><image src="{{clientImgPath}}/images/uts/kuaidi.png"></image></view>
<view wx:if='{{index==-1}}' class="sz_30 bt_hei">请选择快递公司</view>
<view wx:if='{{index>=0}}' class="sz_30 bt_hei">{{selectData[index]}}</view>
</view>
<view class="xiangyouimg"><image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image></view>
</view>
</picker>
<view class="xian mt-30 mb-30"></view>
<view class="ali-c">
<view class="didanimg mr-50"><image src="{{clientImgPath}}/images/uts/dingdanhao.png"></image></view>
<view class="inptqt"><input name='logisticCode' placeholder="请填写快递单号" placeholder-class="sz_30 inp_hui"></input></view>
</view>
<view class="xian mt-30 mb-30"></view>
<view class="ali-z mt-80">
<button class="button_b" bindtap="cancelShipments" style="width:45%">取消</button>
<button class="button " form-type="submit" style="width:45%">确定发货</button>
</view>
</view>
</form>
</view>
/* pages/personal//express/express.wxss */
page{
background: rgba(245, 242, 242, 1);
}
.kuaiimg{
width: 48rpx;
height: 38rpx;
}
.xiangyouimg{
width:10rpx;
height:18rpx;
}
.inptqt{
flex: 1;
height: 40rpx
}
.didanimg{
width: 40rpx;
height: 42rpx;
}
\ No newline at end of file
const app = getApp()
var http_host = app.globalData.http_host;
var img_host = app.globalData.ImgPath;
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
img_host: img_host,
});
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return {
title: '鹿马优选资质',
path: '/pages/my/certificate/certificate'
}
}
})
\ No newline at end of file
{
"navigationBarTitleText": "证件资质"
}
\ No newline at end of file
<view class='top-img'>
<image src='{{img_host}}/static/default/images/xuke.png'></image>
</view>
<view class='top-img-text'>增值电信业务经营许可证</view>
<view class='top-img'>
<image src='{{img_host}}/static/default/images/108zhuzuo.jpg'></image>
</view>
<view class='top-img'>
<image src='{{img_host}}/static/default/images/108zhuzuo2.jpg'></image>
</view>
<view class='top-img-text'>计算机软件著作权登记证书</view>
<view class='top-imgs'>
<image src='{{img_host}}/static/default/images/gaoxin.jpg'></image>
</view>
<view class='top-imgs-text'>国家高新技术企业证书</view>
<view class='top-imgs'>
<image src='{{img_host}}/static/default/images/yingye.png'></image>
</view>
<view class='top-imgs-text'>营业执照</view>
<view class='top-imgs'>
<image src='{{img_host}}/static/default/images/shipin.png'></image>
</view>
<view class='top-imgs-text'>食品经营许可证</view>
\ No newline at end of file
.top-img{
width: 600rpx;
height: 825rpx;
margin: 0 auto
}
.top-img image{
width: 100%;
height: 100%;
}
.top-imgs{
width: 600rpx;
height: 436rpx;
margin: 0 auto
}
.top-imgs image{
width: 100%;
height: 100%;
}
.top-img-text{
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 31rpx;
margin-bottom: 50rpx
}
.top-imgs-text{
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 31rpx;
margin-bottom: 55rpx
}
\ No newline at end of file
const app = getApp()
var http_host = app.globalData.http_host;
var img_host = app.globalData.img_host;
Page({
data:{
site :app.globalData.CONFIG.site,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(app.globalData.CONFIG)
},
callTel:function(e){
wx.makePhoneCall({
phoneNumber: e.currentTarget.dataset.tel // 仅为示例,并非真实的电话号码
})
},
certificate:function(){
wx.navigateTo({
url: '/pages/personal/lumainfo/certificate/certificate',
})
},
agreement:function(){
wx.navigateTo({
url: '/pages/my/agreement/agreement',
})
},
lumaintroduce: function () {
wx.navigateTo({
url: '/pages/personal/lumainfo/lumaintroduce/lumaintroduce',
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "关于鹿马"
}
\ No newline at end of file
<!-- 头部 -->
<view class='imageTop'>
<image src='{{img_host}}/static/default/images/logo@2x.png'></image>
</view>
<view class='textTop'>
<text class='textTop-t'>鹿马优选</text>
<text class='textTop-e'>V5.0.1</text>
</view>
<!-- 内容 -->
<view class='background'>
<view class='content-top-one' bindtap='lumaintroduce'>
<text class='content-top-one-t'>关于鹿马</text>
<view style='width:17rpx;height:31rpx;position: absolute;right: 39rpx;top:40rpx;line-height: 90rpx; '>
<image src='{{img_host}}/static/default/images/dayuhao.png'style="width:100%;height:100%;"></image>
</view>
</view>
<view class='content-top-one' bindtap='agreement' style='display:none'>
<text class='content-top-one-t'>协议及声明</text>
<view style='width:17rpx;height:31rpx;position: absolute;right: 39rpx;line-height: 90rpx; '>
<image src='{{img_host}}/static/default/images/dayuhao.png'style="width:100%;height:100%;"></image>
</view>
</view>
<view class='content-top-one' bindtap='certificate'>
<text class='content-top-one-t'>证件资质</text>
<view style='width:17rpx;height:31rpx;position: absolute;right: 39rpx;top:40rpx;line-height: 90rpx; '>
<image src='{{img_host}}/static/default/images/dayuhao.png'style="width:100%;height:100%;"></image>
</view>
</view>
<view class='content-top-one'>
<text class='content-top-one-t'>微信公众号</text>
<text class='content-top-one-x'>鹿马优选</text>
</view>
<view class='content-top-one'>
<text class='content-top-one-t'>客服电话</text>
<text class='content-top-one-x' bindtap='callTel' data-tel='{{site.tel}}' >{{site.tel}}</text>
</view>
</view>
<!--底部 -->
<view class='textDottom'>
<text>Copyright©2019鹿马优选 All Rights Reserved</text><br/>
<text>江西多思盈信息科技有限公司</text>
</view>
\ No newline at end of file
page{
background:rgba(246,246,246,1);
padding-top: 80rpx;
}
.navigator-hover{
background: none;
}
.imageTop{
width: 174rpx;
height: 189rpx;
margin: 0 auto
}
.imageTop image{
width: 100%;
height: 100%;
}
.textTop{
padding-top:20rpx;
margin: 0 auto;
width: 200rpx;
height: 200rpx;
text-align:center;
}
.textTop-t{
font-size:38rpx;
font-weight:bold;
color:rgba(26,26,26,1);
}
.textTop-e{
font-size:32rpx;
font-weight:400;
color:rgba(132,132,132,1);
}
/* 内容 */
.background{
margin: 0 auto;
width:710rpx;
background:rgba(255,255,255,1);
border-radius:20rpx;
}
.content-top-one-t{
float: left;
margin-left:39rpx;
line-height: 100rpx;
/* width:335rpx;
height:26rpx; */
font-size:26rpx;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(128,128,128,1);
}
.content-top-one-x{
float: right;
margin-right:39rpx;
line-height: 103rpx;
/* width:121rpx;
height:30rpx; */
font-size:26rpx;
font-family:Montserrat-Regular;
font-weight:400;
color:rgba(51,51,51,1);
}
.content-top-one{
position: relative;
width:100%;
height:100rpx;
border-bottom: 1rpx solid rgba(245,245,245,1)
}
/* dibu */
.textDottom{
margin: 0 auto;
position: absolute;
left:50%;
transform: translateX(-50%);
bottom: 70rpx;
width: 480rpx;
text-align:center;
}
.textDottom text{
text-align:center;
font-size:22rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(166,166,166,1);
}
\ No newline at end of file
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
img_host: app.globalData.img_host,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
app.sendRequest({
url: '/Article/index',
data: {
content_id: 1,
},
success: function (res) {
console.log("saddas",res)
if (res.status <0) {
app.showModal({
content: res.msg, //错误信息: res.errMsg
url: '/pages/my/about_user/about_user'
})
}else{
//富文本格式转化
let contents = res.contents.contents;
wxParse.wxParse('contents', 'html', contents, that, 5);
}
},
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return {
title:"关于鹿马",
path: '/pages/my/lumaintroduce/lumaintroduce'
}
}
})
\ No newline at end of file
{
"navigationBarTitleText": "关于鹿马"
}
\ No newline at end of file
<import src="../../../components/wxParse/wxParse.wxml" />
<view class='background'>
<view class='content-top-one'>
<view class='content-top-one-t'>
<!-- <template is="wxParse" data="{{wxParseData:contents.nodes}}" /> -->
鹿马108是多思盈推出的一款全新互联网电商服务平台,它以服务消费者为导向、资源共享为基础引用移动互联技术把消费者、商家、合伙人、平台四为一体,鹿马108电商平台致力于让消费者消费更实惠、商家获利还 优惠、合伙人赚钱更便利的服务宗旨。
</view>
</view>
</view>
page{
border-top:1rpx solid rgba(246,246,246,1);
}
.navigator-hover{
background: none;
}
.background{
width:100%;
background:rgba(255,255,255,1);
padding-top: 30rpx;
box-sizing: border-box;
}
.content-top-one{
margin: 0 auto;
width:680rpx;
text-align: justify;
text-indent: 2em;
line-height: 50rpx;
font-size:30rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgb(71, 69, 69);
}
.content-top-one-t{
height: 100%;
}
var app = getApp();
import { addrList, deleteAddr,setDefaultAddr } from "../../../../api/basicInformation.js";
Page({
/**
* 页面的初始数据
*/
data: {
addr_list : [],
clientImgPath: app.globalData.clientImgPath,
type:'0', //0普通进入 1外卖地址进入 2商城地址进入
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.init();
},
init(){
addrList({type:this.data.type}).then(res=>{
this.setData({
addr_list : res.data
})
})
},
addNewAddr(){
wx.navigateTo({
url: '/pages/personal/set/new_address/new_address?type='+this.data.type,
})
},
change(e){
let items=e.currentTarget.dataset.items;
wx.navigateTo({
url: '/pages/personal/set/new_address/new_address?isedit=' + JSON.stringify(items)
})
},
deleteAddr(e){
var that = this
wx.showModal({
title: '提示',
content: '确认删除?',
confirmText: '确认',
showCancel: true,
success: function (res) {
if (res.confirm) {
var data = {
addr_id: e.currentTarget.dataset.id
}
deleteAddr(data).then(res => {
if (res.code == 0) {
/*wx.showModal({
title: '提示',
content: '删除成功',
confirmText: '确认',
showCancel: false,
success:function(res){
that.init();
}
})
*/
that.init();
} else {
wx.showModal({
title: '提示',
content: res.msg,
})
}
})
}
}
})
},
//设置默认地址
setDefaultAddr(e){
console.log(e)
let index=e.target.dataset.index;//点击的下标
let addr_id=e.detail.value[0];//点击的地址id
let type=e.target.dataset.type;//点击的地址类型
let addr_list=this.data.addr_list;
console.log(index,addr_id,type,addr_list)
setDefaultAddr({
addr_id:addr_id,
type:type
}).then(res=>{
wx.showToast({
title: res.data,
icon: 'none'
})
if(res.code==0){
addr_list.map((item,index)=>{
if(item.type==type){
if(item.addr_id==addr_id){
item.is_default=1;
}else{
item.is_default=0;
}
}
})
this.setData({addr_list});
}
}).catch(err=>{
wx.showToast({
title: err. data,
icon: 'none'
})
})
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "我的收货地址"
}
\ No newline at end of file
<view class="boxs">
<view wx:for='{{addr_list}}' wx:key="index" wx:for-item="item">
<checkbox-group bindchange='setDefaultAddr' data-type="{{item.type}}" data-index="{{index}}">
<view class="bobox ov">
<view class="beijing posr">
<view class="sz_30 c_bi twb">{{item.name}} <text>{{item.mobile}} </text></view>
<view class="sz_30 c_bi mt-10" >{{item.addr}}</view>
<image wx:if="{{item.type==2}}" class="posa" src="{{clientImgPath}}/images/images/sc.png"></image>
<image wx:if="{{item.type==1}}" class="posa" src="{{clientImgPath}}/images/images/wm.png"></image>
</view>
<view class="dibubox ali-z">
<view class="ali-c">
<checkbox
disabled="{{item.is_default==1}}"
checked="{{item.is_default==1}}"
value="{{item.addr_id}}"
class="mb-10"
/>
<view class="sz_30 bt_hei ml-20">设为默认地址</view>
</view>
<view class="ali-c">
<view bindtap="change" data-items="{{item}}">
<view class="btnxiao"> 修改</view>
</view>
<view data-id="{{item.addr_id}}" class="btnxiao ml-30" bindtap="deleteAddr">删除</view>
</view>
</view>
</view>
</checkbox-group>
</view>
<button class="button_a flexc mt-60" bindtap="addNewAddr">
<view class="bttimg"><image src="{{clientImgPath}}/images/uts/jiayige.png"></image></view>
<view class="ml-30">添加新地址</view>
</button>
</view>
/* pages/personal//set/address_list/address_list.wxss */
page{
background: rgba(245, 242, 242, 1);
}
.bobox{
width:100%;
background:rgba(255,255,255,1);
border-radius:10rpx;
margin-bottom: 20rpx;
}
.beijing{
width:100%;
background:linear-gradient(90deg,rgba(255,105,0,1),rgba(254,144,67,1));
padding: 20rpx 20rpx;
box-sizing: border-box;
}
.beijing>image{
width:100rpx;height:100rpx;right: 0;top: 0;
}
.dibubox{
padding: 30rpx 20rpx;
box-sizing: border-box;
}
.btnxiao{
padding: 5rpx 20rpx;
box-sizing: border-box;
border:2rpx solid #f64f15;
border-radius:10rpx;
font-size:30rpx;
font-weight:500;
color:#f64f15;
}
.bttimg{
width: 46rpx;
height: 46rpx;
}
\ No newline at end of file
import { addAddress, getUserAddr,getAddressList } from "../../../../api/basicInformation.js";
var app = getApp();
var clientImgPath = app.globalData.clientImgPath;
var img_host = app.globalData.ImgPath;
import Util from '../../../../utils/util.js';
var QQMapWX = require('../../../../utils/libs/qqmap-wx-jssdk.min.js');
var qqmapsdk = new QQMapWX({
key: 'CK6BZ-BTHCW-4IPRC-OZLAN-ZTITF-Y3FHA'
});
Page({
/**
* 页面的初始数据
*/
data: {
clientImgPath: app.globalData.clientImgPath,
check: true,
is_edit: 0,
is_default: 0,
radioItems: [ //单选框
{name: '1',value: '外卖',checked: false},
{name: '2',value: '商城',checked: true}
],
type:0,//0普通进入 1外卖地址进入 2商城订单进入
array:[[],[],[]],//省市区
pickerValue:[0,0,0],//选中的下标
manageType:1,//1添加 2修改
addressData: {
addr_id:'', //地址id (修改地址时才有)
name:'', //名字
mobile:'', //电话
addr:'',//省市区
doorplate:'',//详细地址
province:'',//省id
citys:'', //城市id
countys:'', //区id
lng:'',
lat:'',
is_default:'0', //0不是默认地址 1默认
type:2,//1外卖 2商城
},
type:0, //0普通进入 1外卖地址进入 2商城地址进入
},
bindinput(e){
let value=e.detail.value;
let type=e.target.dataset.type;
let addressData=this.data.addressData;
if(type==1){
addressData.name=value; //名字
}else if(type==2){
addressData.mobile=value; //电话
}else{
addressData.doorplate=value; //详细地址
}
console.log(addressData)
this.setData({addressData});
},
bindPickerChange(e){ //选择省市区 点击确定
let trueAddr='',
value=e.detail.value,//选中的下标
num=0,
array=this.data.array,
addressData=this.data.addressData;
for( let i=0;i<value.length;i++){
if(value[i]==0){
break;
}else{
num++;
if(num==value.length){
array.map((item,index)=>{
trueAddr=trueAddr+''+item[value[index]].name;
})
}
}
}
addressData.trueAddr=trueAddr;
this.setData({ addressData });
},
columnchange(e){ //选择某个地区
let array=this.data.array;//省市区 数组
let column=e.detail.column; //0省 1市 2区
let index=e.detail.value; //下标
let obj=array[column][index];
let pickerValue=this.data.pickerValue;//选择得下标
pickerValue[column]=index;//选中的这项下标添加进去
if(column==0){
if(index!=0){
if(array[1].length!=0){
array[1]=array[2]=[];
pickerValue[1]=pickerValue[2]=0;
}
this.getAddressList(obj.pid,column);
}else{
array[1]=array[2]=[];
}
}else{
if(column!=2){
if(index==0){
array[2]=[];
}else{
this.getAddressList(obj.pid,column)
}
}
}
this.setData({ array,pickerValue });
},
radioChange(e){ //点击单选框
let radioItems=this.data.radioItems;
radioItems.map(item=>{
if(item.name==e.detail.value){
item.checked=true;
}else{
item.checked=false;
}
})
this.setData({ radioItems });
},
openMap: function () {
var that = this;
let addressData=this.data.addressData;
wx.chooseLocation({
success:(res)=> {
// addressData.lat=addressData.lat1=res.latitude;
// addressData.lng=addressData.lng1=res.longitude;
addressData.lat=res.latitude;
addressData.lng=res.longitude
addressData.doorplate=res.address+res.name;//详细地址
console.log(res.latitude,res.longitude,res)
that.setData({
addressData
})
qqmapsdk.reverseGeocoder({
location: {
latitude: res.latitude,
longitude: res.longitude
},
success: function (data) {
let res=data.result;
addressData.trueAddr=res.address_component.province+res.address_component.city+res.address_component.district;//省市区
addressData.province=Number(res.ad_info.adcode)-Number(res.ad_info.adcode)%1000;//省ID
addressData.citys=Number(res.ad_info.adcode)-Number(res.ad_info.adcode)%100;//市ID
addressData.countys=Number(res.ad_info.adcode);//区县ID
that.setData({
addressData
})
console.log(addressData)
}
})
}
})
},
// 点击切换
clickTab (e) {
console.log(e)
var addressData = this.data.addressData;
addressData.is_default=e.currentTarget.dataset.current;
this.setData({
addressData
})
},
Submit() {
let addressData=this.data.addressData;//全部参数
let array=this.data.array;//地址
console.log(this.data.addressData)
if(!addressData.name){
wx.showToast({title: '请填写收货人姓名', icon: 'none'});
return;
}
if(!/(^1[3|4|5|7|8|9][0-9]{9}$)/.test(addressData.mobile)){
wx.showToast({title: '请输入正确的手机号码', icon: 'none'});
return;
}
if(!addressData.trueAddr){
wx.showToast({title: '请选择所在地址', icon: 'none'});
return;
}
if(!addressData.doorplate){
wx.showToast({title: '请输入详细收获地址', icon: 'none'});
return;
}
if(this.data.manageType==1){ //添加收获地址
this.data.radioItems.map((item,index)=>{ //外卖地址 还是 商城地址
if(item.checked){
addressData.type=index+1;
}
})
if(addressData.type==2){ //商城地址才有pid
addressData.province=array[0][this.data.pickerValue[0]].pid;//省id
addressData.citys=array[1][this.data.pickerValue[1]].pid;//城市id
addressData.countys=array[2][this.data.pickerValue[2]].pid; //区id
addressData.lat='';
addressData.lng='';
}
}else{
if(addressData.type==2){ //商城地址才有pid
addressData.lat='';
addressData.lng='';
}
}
this.setData({addressData});
console.info(addressData,'fdfdf')
addAddress({
addr_id: addressData.addr_id,
name: addressData.name,
mobile: addressData.mobile,
is_default:addressData.is_default,
trueAddr: addressData.trueAddr,
doorplate: addressData.doorplate,
type: addressData.type,
province: addressData.province,
citys: addressData.citys,
countys: addressData.countys,
lat1: addressData.lat,
lng1: addressData.lng,
// lat: '11111', //字段作废
// lng: '22222', //字段作废
}).then(res => {
let pages = getCurrentPages()
if (pages.length > 2) {
let prevpage = pages[pages.length - 2]
prevpage.setData({
addr_user_id: res.data.addr_id || 0,
addr_id: res.data.addr_id || 0,
})
}
if (res.code == 0) {
wx.navigateBack({
delta: 1,
})
} else {
wx.showToast({
title: res.msg,
icon: 'none'
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(option) {
let radioItems=this.data.radioItems;
let manageType=0;
if(option.type!='0'){
radioItems.map(item=>{
item.checked=false;
});
}
if(option.isedit){ //编辑 修改 进来
let addressData = JSON.parse(option.isedit);
manageType=2;
radioItems[addressData.type-1].checked=true;
if(addressData.type==2){
addressData.lat='';
addressData.lng='';
}
console.log(addressData,'zheli')
this.setData({addressData});
}else{ //添加地址进来
manageType=1;
if(option.type!=0){
radioItems[option.type-1].checked=true;
}
}
this.setData({type:option.type,radioItems,manageType});
this.getAddressList();//省市区
},
getAddressList(pid,column){ //省市区
wx.showLoading({title:'请稍后...'});
let obj={pid:0,ParentId:0,name:'请选择'};
let array=this.data.array;
getAddressList({
pid:pid?pid:''
}).then(res=>{
if(res.code==0){
wx.hideLoading();
res.data.unshift(obj);
if(pid){ //一开始请求省
if(column==0){ //选则了省 请求出了市的数据
array[1]=res.data;
}else if(column==1){ //选则了市 请求出了区的数据
array[2]=res.data;
}
}else{
array[0]=res.data;
}
this.setData({array});
}
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "添加新地址"
}
\ No newline at end of file
<view class="boxs">
<form >
<view class="topboxss">
<view class="ali-z">
<view class="flex1">
<view class="lieboxs ali-c">
<view class="biqim">收货人</view>
<view class="inptbox">
<input
value="{{addressData.name}}"
name='name'
placeholder="请填写收货人姓名"
placeholder-class="sz_30 inp_hui"
bindinput="bindinput"
data-type="1"
>
</input>
</view>
</view>
<view class="xian"></view>
<view class="lieboxs ali-c">
<view class="biqim">手机号码</view>
<view class="inptbox">
<input
value="{{addressData.mobile}}"
name='mobile'
placeholder="请填写手机号码"
placeholder-class="sz_30 inp_hui"
bindinput="bindinput"
data-type="2"
>
</input>
</view>
</view>
<view class="xian"></view>
<view class="lieboxs ali-c">
<view class="biqim">地址类型</view>
<radio-group class="inptbox ali-c" bindchange="radioChange" >
<label class="ali-c mr-20" wx:for="{{radioItems}}" wx:key="index">
<radio
color="#F54F15"
style="transform:scale(0.7)"
id="{{item.name}}"
value="{{item.name}}"
checked="{{item.checked}}"
disabled='{{manageType==2}}'
>
</radio>
<label class="label-2-text" for="{{item.name}}">
<text class="s30" style="color:{{item.checked?'#F54F15':''}}">{{item.value}}</text>
</label>
</label>
</radio-group>
</view>
</view>
</view>
<view class="xian"></view>
<!-- 外卖地址 -->
<view class="lieboxs ali-z" bindtap="openMap" wx:if="{{radioItems[0].checked}}">
<view class="biqim">所在地址</view>
<view class="inptboxsd sz_30 bt_hei">
<input
class="pr-20"
disabled="true"
value='{{addressData.trueAddr}}'
name='address_component'
placeholder="请选择所在地址"
placeholder-class="sz_30 inp_hui"
>
</input>
</view>
<view class="dingwimg" wx:if="{{check}}">
<image src="{{clientImgPath}}/images/wm/dizhi@2x.png" style="width:28rpx;height:42rpx"></image>
</view>
</view>
<!-- 商城地址-->
<picker
mode ='multiSelector'
class="lieboxs"
wx:if="{{radioItems[1].checked}}"
value="{{pickerValue}}"
range="{{array}}"
bindchange="bindPickerChange"
bindcolumnchange="columnchange"
wx:if="{{radioItems[1].checked}}"
range-key="name"
>
<view class="ali-c" style="height:100rpx">
<view class="biqim">所在地区</view>
<view class="inptbox">
<input
name='doorplate'
disabled="true"
value="{{addressData.trueAddr}}"
placeholder="请选择所在区域"
placeholder-class="sz_30 inp_hui"
>
</input>
</view>
<image src="{{clientImgPath}}/images/images/storeicons3.png" style="width:18rpx;" mode="widthFix"></image>
</view>
</picker>
<view class="xian"></view>
<view class="lieboxs ali-c">
<view class="biqim">详细地址</view>
<view class="inptbox">
<input
name='doorplate'
value="{{addressData.doorplate}}"
placeholder="如:道路、门牌号、小区、楼栋号、单元等"
placeholder-class="sz_30 inp_hui"
bindinput="bindinput"
data-type="3"
>
</input>
</view>
</view>
<view class="xian mb-20"></view>
<view class="ali-z pb-20">
<view class="sz_30 bt_hei">设置为默认地址</view>
<view class="ali-c btnbox ov">
<view class="{{addressData.is_default==0?'btnbox_zi1':'btnbox_zis1'}}" data-current="0" bindtap="clickTab"></view>
<view class="{{addressData.is_default==1?'btnbox_zi':'btnbox_zis'}}" data-current="1" bindtap="clickTab"></view>
</view>
</view>
</view>
<button class="button mt-60" hover-class="button-hover" type='primary' bindtap="Submit">保存并使用</button>
</form>
</view>
\ No newline at end of file
/* pages/personal//set/new_address/new_address.wxss */
page{
background: rgba(245, 242, 242, 1);
}
/* */
.lieboxs{
width: 100%;
height: 100rpx;
}
.biqim{
width: 150rpx;
font-size:30rpx;
font-weight:500;
color:rgba(0,0,0,1);
}
.inptbox{
flex: 1;
height: 50rpx;
font-size:30rpx;
font-weight:500;
color:rgba(0,0,0,1);
}
.inptbox input{
flex: 1;
height: 100%;
}
.getMsgBtn{
background:rgba(255,105,0,1);
border-radius:5rpx;
padding:10rpx 20rpx ;
box-sizing: border-box;
font-size:30rpx;
font-weight:500;
color:rgba(255,255,255,1);
}
.grayColor{
background: #FEC59C;
border-radius:5rpx;
padding:10rpx 20rpx ;
box-sizing: border-box;
font-size:30rpx;
font-weight:500;
color:rgba(255,255,255,1);
}
.dhuaimg{
width: 53rpx ;height:64rpx;
margin: 0 auto;
}
.dhuabox{
width: 180rpx;
height: 200rpx;
padding-top: 60rpx;
box-sizing: border-box;
border-left: 1px solid rgba(220, 220, 220,.3);
}
.btnbox{
border:1px solid #f64f15;
border-radius:5rpx;
}
.btnbox_zi{
width:70rpx;
height:56rpx;
background: #f64f15;
}
.btnbox_zis{
width:70rpx;
height:36rpx;
}
.btnbox_zi1{
width:70rpx;
height:56rpx;
background: #FEC59C;
}
.btnbox_zis1{
width:70rpx;
height:56rpx;
}
.xiangyouimg{
width:13rpx;
height:24rpx;
}
.dingwimg{
width: 30rpx;
height: 50rpx;
}
.inpudz{
width: 450rpx;
}
.inptboxsd{
flex: 1;height: 100rpx;
}
.inptboxsd input{
flex: 1;height: 100rpx;
}
.inp_hui{
font-size: 26rpx !important;
color: rgb(170, 170, 170) !important;
}
\ No newline at end of file
import {
checkPassword,
resetmypassword,
sendSms,
havepassword
} from "../../../../api/basicInformation.js";
var app = getApp();
// pages/personal//set/payment_code/payment_code.jsz
Page({
/**
* 页面的初始数据
*/
data: {
currentTab: 0,
Length: 6, //输入框个数
isFocus: true, //聚焦
Value: "", //输入的内容
ispassword: true, //是否密文显示 true为密文, false为明文。
disabled: true,
disabled_tu: true,
// 验证码
isGetMsg: true,
dTime: 60,
timer: '',
c_password: [],
is_hidden: false,
newPass: '',
msg: "请验证支付密码确保是本人操作",
mobile: '',
is_msg: '修改',
is_create: false
},
//点击切换
clickTab: function (e) {
console.log(this.data.password)
//debugger;
var that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab: e.target.dataset.current,
})
}
},
// 填写密码判断按钮状态
qr_code: function (e) {
var that = this;
console.log(e.detail.cursor)
var code_cursor = e.detail.cursor;
that.setData({
code_cursor: e.detail.cursor
})
if (e.detail.cursor == 6) {
that.data.disabled_tu = false;
that.setData({
disabled_tu: false,
});
console.log(that.data.disabled_tu)
} else {
that.data.disabled_tu = true;
that.setData({
disabled_tu: true,
});
}
console.log(that.data.disabled_tu)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
currentTab: options.type ? options.type : 0
})
this.havepassword();
},
havepassword() {
havepassword().then(res => {
if (res.code == -1) {
this.setData({
msg: '创建',
is_hidden: true,
is_new: true,
msg: '请输入你的密码',
disabled: false
})
}
})
},
// 密码输入框
Focus(e) {
var that = this;
//console.log(e.detail.value);
var inputValue = e.detail.value;
var ilen = inputValue.length;
if (ilen == 6) {
console.log(inputValue)
that.setData({
oldPAss: inputValue,
disabled: false,
})
} else {
that.setData({
disabled: true,
})
}
that.setData({
Value: inputValue,
})
},
Tap() {
var that = this;
that.setData({
isFocus: true,
})
},
// formSubmit(e) {
// this.setData(
// oldPAss = e.detail.value.password
// )
// },
is_next() {
let that = this
var data = {
user_id: this.data.user_id,
password: this.data.oldPAss,
is_pay: true
}
checkPassword(data).then(
res => {
if (res.code == 0) {
that.setData({
msg: "",
is_hidden: true
})
} else {
app.showModal({
content: "输入的旧密码是错误的",
showCancel: false
})
//原本事替换为空,但还是影响输错的用户,所以先隐藏起来,让用户有更好的体验,不用重复点击清除空字符
// this.setData({
// Value: '',
// })
}
}
);
},
checkChange(e) {
var data = {
newPass: e.detail.value.newPass,
verifyPass: e.detail.value.verifyPass,
is_pay: true
}
resetmypassword(data).then(
res => {
if (res.code == 0) {
wx.showModal({
title: '提示',
content: '操作成功',
success: function (res) {
if (res.confirm) {
wx.navigateBack({
delta: 1
})
}
}
})
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
confirmText: '确认',
})
}
}
)
},
setMobile(e) {
this.setData({
mobile: e.detail.value
})
},
// 获取验证码
getMsgBtn() {
let that = this
// 判断是否填了手机号码,假设未填写
let mobile = that.data.mobile
if (mobile.length == 11) {
var data = ({
mobile: mobile,
user_id: app.globalData.userInfo.user_id
})
sendSms(data).then(res => {
if (res.code == -1) {
console.log(111)
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
confirmText: '确认',
})
}
})
that.setData({
isGetMsg: false,
dTime: 60,
timer: setInterval(function () {
let seconds = that.data.dTime
that.setData({
dTime: seconds - 1
})
if (that.data.dTime == 0) {
// 读秒结束 清空计时器
that.setData({
isGetMsg: true,
dTime: 60
})
clearInterval(that.data.timer)
}
}, 1000)
})
} else {
// 此为自定义的提示
wx.showModal({
title: '提示',
content: "请正确输入手机号",
showCancel: false,
confirmText: '确认',
})
}
},
forgetPass(e) {
console.log(e)
var data = {
mobile: e.detail.value.mobile,
newPass: e.detail.value.newPass,
verifycode: e.detail.value.verifyCode,
verifyPass: e.detail.value.verifyPass,
is_verifycode: true,
is_pay: 1
}
resetmypassword(data).then(res => {
if (res.code == 0) {
app.showModal({
content: "修改密码成功",
url: "/pages/personal/set/set"
})
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
confirmText: '确认',
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "支付密码"
}
\ No newline at end of file
<!--pages/personal//set/payment_code/payment_code.wxml-->
<block wx:if="{{!is_hidden}}">
<view class="xian"></view>
<view class="tapbox ali-z">
<view class="topzi {{currentTab==0?'topzis':''}}" data-current="0" bindtap="clickTab">{{is_msg}}支付密码</view>
<view class="tapshuxian"></view>
<view class="topzi {{currentTab==1?'topzis':''}}" data-current="1" bindtap="clickTab">忘记支付密码</view>
</view>
</block>
<view class="boxs">
<view class="{{currentTab==0?'tshow':'hidden'}}">
<view class="topbox_20">
<!-- 先验证在显实更改 -->
<view class="Toptitle"> {{msg}}</view>
<!-- <view class="Toptitle">请设置6位不同数字的支付密码</view> -->
<form bindsubmit="formSubmit" hidden="{{is_hidden}}">
<view class='content' style="border-left:none;">
<block wx:for="{{Length}}" wx:key="item">
<input class='iptbox' value="{{Value.length>=index+1?Value[index]:''}}" disabled password='{{ispassword}}' catchtap='Tap'></input>
</block>
</view>
<input name="password" type="number" password="{{true}}" class='ipt' maxlength="{{Length}}" focus="{{isFocus}}" bindinput="Focus"></input>
<view>
<button class="btn-area " bindtap="is_next" hover-class="button-hover" type='primary' disabled='{{disabled}}' formType="primary">下一步</button>
</view>
</form>
<form bindsubmit="checkChange" hidden="{{!is_hidden}}">
<view class="xian"></view>
<view class="lieboxs ali-c">
<view class="biqim">新密码</view>
<view class="inptbox">
<input type="number" name='newPass' maxlength="6" password="true" placeholder="请输入6位数新密码" placeholder-class="sz_30 inp_hui"></input>
</view>
</view>
<view class="xian"></view>
<view class="lieboxs ali-c">
<view class="biqim">确认密码</view>
<view class="inptbox">
<input type="number" name='verifyPass' bindinput="qr_code" maxlength="6" password="true" placeholder="请再次输入6位数新密码" placeholder-class="sz_30 inp_hui"></input>
</view>
</view>
<button class="btn-area " form-type="submit" hover-class="button-hover" type='primary' disabled='{{disabled}}'>确定设置</button>
</form>
</view>
</view>
<view class="{{currentTab==1?'tshow':'hidden'}}">
<form bindsubmit="forgetPass" report-submit="true">
<view class="topboxss">
<view class="lieboxs ali-c">
<view class="biqim">手机号</view>
<view class="inptbox">
<input type='number' bindinput="setMobile" name='mobile' maxlength="11" placeholder="请输入手机号" placeholder-class="sz_30 inp_hui"></input>
</view>
</view>
<view class="xian"></view>
<view class="lieboxs ali-c">
<view class="biqim">验证码</view>
<view class="inptbox">
<input name='verifyCode' placeholder="请输入验证码" placeholder-class="sz_30 inp_hui"></input>
</view>
<view class="newaddrightBox msgBOXR">
<view class="getMsgBtn" bindtap="getMsgBtn" wx:if="{{isGetMsg}}">获取验证码</view>
<view class="grayColor" wx:if="{{!isGetMsg}}">{{dTime}}s</view>
</view>
</view>
<view class="xian"></view>
<view class="lieboxs ali-c">
<view class="biqim">新密码</view>
<view class="inptbox">
<input type="number" name='newPass' maxlength="6" password="true" placeholder="请输入6位数新密码" placeholder-class="sz_30 inp_hui"></input>
</view>
</view>
<view class="xian"></view>
<view class="lieboxs ali-c">
<view class="biqim">确认密码</view>
<view class="inptbox">
<input type="number" name='verifyPass' bindinput="qr_code" maxlength="6" password="true" placeholder="请再次输入6位数新密码" placeholder-class="sz_30 inp_hui"></input>
</view>
</view>
</view>
<button class="button mt-60" hover-class="button-hover" type='primary' disabled='{{disabled_tu}}' formType="submit">确认修改</button>
</form>
</view>
</view>
\ No newline at end of file
/* pages/personal//set/payment_code/payment_code.wxss */
page{
background: rgba(245, 242, 242, 1);
}
.Toptitle{
text-align: center;
margin: 60rpx auto 46rpx;
font-size: 30rpx;
font-weight: 600;
color: #000;
}
.content{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
margin-top: 60rpx;
border-left:none;
border: 1rpx solid #ddd
}
.iptbox{
width: 110rpx;
height: 96rpx;
border-left:1rpx solid #ddd;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.ipt{
width: 0;
height: 0;
}
.btn-area{
width: 80%;
margin: 0 auto;
background: #f64f15 !important;
margin-bottom:20rpx;
}
/* */
.lieboxs{
width: 100%;
height: 100rpx;
}
.biqim{
width: 25%;
font-size:30rpx;
font-weight:500;
color:rgba(0,0,0,1);
}
.inptbox{
flex: 1;
height: 50rpx;
font-size:30rpx;
font-weight:500;
color:rgba(0,0,0,1);
}
.inptbox input{
flex: 1;
height: 100%;
}
.getMsgBtn{
background:rgba(255,105,0,1);
border-radius:5rpx;
padding:10rpx 20rpx ;
box-sizing: border-box;
font-size:30rpx;
font-weight:500;
color:rgba(255,255,255,1);
}
.grayColor{
background: #F8C8A7;
border-radius:5rpx;
padding:10rpx 20rpx ;
box-sizing: border-box;
font-size:30rpx;
font-weight:500;
color:rgba(255,255,255,1);
}
const app = getApp();
import { getPhone, saveMobile,getUserInfo } from '../../../api/user.js';
var clientImgPath = app.globalData.clientImgPath;
Page({
/**
* 页面的初始数据
*/
data: {
clientImgPath: clientImgPath,
showModal: false,
hidden:false,//登陆弹窗是否显示
},
// 外面的弹窗
btn: function () {
this.setData({
showModal: true
})
},
// 禁止屏幕滚动
preventTouchMove: function () {
},
// 弹出层里面的弹窗
ok: function () {
this.setData({
showModal: false
})
},
//点击切换
clickTab: function (e) {
var that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab:e.target.dataset.current,
})
}
},
// 获取相片
chooseImage(e) {
wx.chooseImage({
sizeType: ['original', 'compressed'], //可选择原图或压缩后的图片
sourceType: ['album', 'camera'], //可选择性开放访问相册、相机
success: res => {
const images = this.data.images.concat(res.tempFilePaths)
// 限制最多只能留下3张照片
const images1 = images.length <= 1 ? images : images.slice(0, 1)
// console.log(images1)
this.setData({
images: images1
})
}
})
},
removeImage(e) {
var that = this;
var images = that.data.images;
// 获取要删除的第几张图片的下标
const idx = e.currentTarget.dataset.idx
// splice 第一个参数是下表值 第二个参数是删除的数量
images.splice(idx, 1)
this.setData({
images: images
})
},
// 跳转修改密码
payment:function(){
wx.navigateTo({
url: '/pages/personal/set/payment_code/payment_code',
})
},
// 跳转我的地址
myAddr: function () {
wx.navigateTo({
url: '/pages/personal/user_address/user_address',
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
if(wx.getStorageSync('userInfo')){
this.setData({
userInfo:wx.getStorageSync('userInfo').info
})
}else{
this.setData({hidden:true});
console.log('没登陆');
}
},
setUserInfo(e){ //点击了授权
if(e.detail){
this.setData({
userInfo:wx.getStorageSync('userInfo').info
});
}else{
wx.navigateBack({});
}
},
//自定义获取电话号码
getPhone: function () {
var that = this;
var userInfo = that.data.userInfo;
if (userInfo.mobile == "" || userInfo.mobile == null) {
this.setData({
mobile: userInfo.mobile,
modalstatus: true
})
}
},
phoneClick() { //有电话时
this.setData({ showModal:true });
},
//电话号码
getPhoneNumber(e) {//点击获取手机号码按钮
console.log(e);
wx.checkSession({
success:()=> {
if (e.detail.errMsg == 'getPhoneNumber:fail user deny') {
this.setData({
modalstatus: true
});
} else {//同意授权
getPhone({
iv:e.detail.iv,
encryptedData:e.detail.encryptedData
}).then(res => {
if( res.code == 0 ){
this.data.mobile = res.data.phoneNumber;
}else{
wx.showToast({
title: res.msg,
icon:'none'
})
}
this.setData({modalstatus:false});
wx.setStorageSync('phone', this.data.mobile);
this.saveMobile();
})
}
},
fail: function () {
console.log("session_key 已经失效,需要重新执行登录流程");
}
});
},
saveMobile(e) {
let that=this;
saveMobile({
mobile : that.data.mobile
}).then(res => {
if( res.code == 0 ){
that.setData({ showModal:false });
wx.showModal({
title: '提示',
content: res.msg,
showCancel:false,
success (res) {
if (res.confirm) {
getUserInfo({}).then(res=>{
wx.setStorageSync('userInfo', res.data);
wx.setStorageSync('user_id', res.data.info.user_id);
that.setData({ userInfo:res.data.info });
}).catch(err=>{
console.log(err);
})
}
}
})
}else{
wx.showToast({
title: res.msg,
icon:'none'
})
}
})
},
cancelUserInfo: function () {
this.setData({
modalstatus: false
});
},
inputMobile (e) { //手机号输入框输入事件
this.setData({ mobile: e.detail.value});
},
})
\ No newline at end of file
{
"usingComponents": {
},
"navigationBarTitleText": "设置管理"
}
\ No newline at end of file
<!--pages/personal//set/set.wxml-->
<view wx:if="{{modalstatus}}">
<view class='drawer_screen' bindtap='cancleBtn' />
<view class='drawer_box'>
<view class="drawer_title">温馨提示</view>
<view class='drawer_content'>
<text class='titleMsg'>授权获取您电话号码</text>
</view>
<view class='sureQuery'>
<button class='btnSure' bindtap='cancelUserInfo'>取消</button>
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class='btnSure'>确定</button>
</view>
</view>
</view>
<view class="boxs">
<view class="fangbox_a">
<view class="ali-z pt-20 pb-20 pbox">
<view class="sz_30 bt_hei">头像</view>
<view class="ali-c">
<!-- 移除图片的按钮 -->
<!-- <view class="btnv mr-40" wx:if="{{images.length>=1}}" bindtap="removeImage">删除</view> -->
<view class="touximg ov">
<!-- 默认图片 -->
<view class='uploadImgBtn' >
<view class="mentouimg">
<image src="{{userInfo.face}}"></image>
</view>
</view>
</view>
<view class="xiangyou ml-20">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
</view>
<view class="xian"></view>
<view class="ali-z" style='height:100rpx'>
<view class="sz_30 bt_hei">昵称</view>
<view class="ali-c">
<view class="sz_30 inp_hui">{{userInfo.nickname}}</view>
<view class="xiangyou ml-20">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
</view>
<view class="xian"></view>
<view class="ali-z" bindtap='{{userInfo.mobile==null || userInfo.mobile==""?"getPhone":"phoneClick"}}' style='height:100rpx'>
<view class="sz_30 bt_hei">手机号</view>
<view class="ali-c" >
<view class="sz_30 inp_hui">{{userInfo.mobile|| mobile ||""}}</view>
<view class="xiangyou ml-20">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
</view>
<view class="xian"></view>
<navigator hover-class="none" url="/pages/personal/withdraw/bankCard_list/bankCard_list">
<view class="ali-z" style='height:100rpx'>
<view class="sz_30 bt_hei">我的银行卡</view>
<view class="xiangyou ml-20">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
</navigator>
</view>
<navigator hover-class="none" url="/pages/personal/set/address_list/address_list?type=0">
<view class="fangbox_b mt-20">
<view class="ali-z" style='height:100rpx'>
<view class="sz_30 bt_hei">我的地址</view>
<view class="ali-c">
<view class="sz_30 inp_hui">修改/新增地址</view>
<view class="xiangyou ml-20">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
</view>
</view>
</navigator>
<view class="fangbox_b mt-20">
<view class="ali-z" bindtap="payment" style='height:100rpx'>
<view class="sz_30 bt_hei">支付密码</view>
<view class="ali-c">
<view class="sz_30 inp_hui">修改支付/忘记密码</view>
<view class="xiangyou ml-20">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
</view>
</view>
<!--
<view class="fangbox_c mt-20">
<view class="ali-z" style='height:100rpx'>
<view class="sz_30 bt_hei">生日</view>
<view class="ali-c">
<view class="sz_30 inp_hui">收获生日惊喜</view>
<view class="xiangyou ml-20">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
</view>
<view class="xian"></view>
<view class="ali-z" style='height:100rpx'>
<view class="sz_30 bt_hei">性别</view>
<view class="ali-c">
<view class="{{currentTab==0?'btnvs':'btnv'}}" bindtap="clickTab" data-current="0">♂ 男</view>
<view class="{{currentTab==1?'btnvs':'btnv'}}" bindtap="clickTab" data-current="1" style="margin-left: 20rpx">♀ 女</view>
</view>
</view>
</view>
-->
</view>
<!-- 登陆授权弹窗 -->
<login hidden="{{hidden}}" bind:setUserInfo="setUserInfo"/>
<!-- 弹窗 -->
<!-- 遮罩层 -->
<view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
<!-- 弹出层 -->
<view class="modalDlg" wx:if="{{showModal}}">
<view class="boxs">
<view class="sz_32 bt_heibl te_ct mb-80"> 换绑手机号 </view>
<view class="ali-c mb-30">
<view class="shoujiimg mr-20"><image src="{{clientImgPath}}/images/uts/shoujih.png"></image></view>
<view class="inpbox sz_28 bt_hei"><input style="height:60rpx" bindinput='inputMobile' placeholder="请填写手机号码" placeholder-class="sz_28 inp_hui"></input></view>
</view>
<view class="xian mb-80"></view>
<view class="button" bindtap='saveMobile'>确定</view>
</view>
<view class="quxiaoimg" bindtap="ok"><image src="{{clientImgPath}}/images/uts/guanbi.png"></image></view>
</view>
/* pages/personal//set/set.wxss */
page{
background: rgba(245, 242, 242, 1);
}
.touximg{
width:120rpx;
height:120rpx;
border-radius:50%;
}
.xiangyou{
width:15rpx;
height:25rpx;
}
.btnv{
width:120rpx;
height:55rpx;
border:2rpx solid rgba(220,220,220,1);
box-sizing: border-box;
border-radius:28rpx;
font-size:30rpx;
font-weight:500;
color:rgba(220,220,220,1);
line-height:55rpx;
text-align: center
}
.btnvs{
width:120rpx;
height:55rpx;
background:#f64f15;
border-radius:28rpx;
font-size:30rpx;
font-weight:500;
color:#fff;
line-height:55rpx;
text-align: center
}
.q-image-wrap{
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
}
.q-image{
width: 100%;
height: 100%;
display: block
}
.q-image-remover {
position: absolute;
left:0;
top:0;
width: 50rpx;
height: 50rpx;
z-index: 999
}
.uploadImgBtn{
width: 100%;
height: 100%;
}
.mentouimg{
width: 100%;
height: 100%;
}
/*模态框*/
.drawer_screen {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
background: #000;
opacity: 0.5;
overflow: hidden;
}
/*content*/
.drawer_box {
width:55%;
overflow: hidden;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
z-index: 1001;
background: #fff;
border-radius: 10rpx;
}
.drawer_title {
padding: 15px;
text-align: center;
background-color: gazure;
}
.drawer_content {
height: 50px;
line-height: 50px;
}
.title {
height: 30px;
line-height: 30px;
width: 160rpx;
text-align: center;
display: inline-block;
font: 300 28rpx/30px "microsoft yahei";
}
.text {
color: black;
}
.sureQuery {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
background-color: white;
}
.btn {
width: 100%;
padding: 10px;
text-align: center;
color: red;
}
.btn:active{
width: 100%;
padding: 10px;
text-align: center;
color: red;
background-color: gray;
}
.btnSure {
width: 100%;
padding: 10px;
background-color: #Fff;
text-align: center;
color:#0BB20C;
}
.titleMsg {
font: 200 35rpx/30px;
text-align: center;
display: block;
}
.input_base {
padding-top: 3px;
padding-bottom: 3px;
max-block-size: 10;
display: block;
background-color: white;
margin-top: 40px;
border: 2rpx solid #ccc;
padding-left: 20rpx;
margin-right: 10%;
border-radius: 3px;
margin-left: 10%;
}
/* 遮罩层 */
.mask{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
z-index: 9000;
opacity: 0.5;
}
/* 弹出层 */
.modalDlg{
width: 70%;
position: fixed;
top: 30vh;
left: 0;
right: 0;
z-index: 9999;
margin: 0 auto;
background-color: #fff;
border-radius:5px;
display: flex;
flex-direction: column;
align-items: center;
}
.quxiaoimg{
width: 68rpx;
height: 68rpx;
position: fixed;
top: 68vh;
left: 0;
right: 0;
margin: 0 auto;
}
/* 弹出层里面的文字 */
.text{
text-align: justify;
font-size: 14px;
color: #666;
width: 180px;
margin-top: 10px;
}
.shoujiimg{
width: 30rpx;
height: 40rpx;
}
.inpbox{
flex: 1
}
.inpbox input{
flex: 1
}
\ No newline at end of file
const app = getApp();
import { getWxBankList, addBank } from '../../../../api/basicInformation.js';
import { getMemberInfo } from '../../../../api/user.js';
var clientImgPath = app.globalData.clientImgPath;
Page({
/**
* 页面的初始数据
*/
data: {
// input
inputLength: 0,
show: false, //控制下拉列表的显示隐藏,false隐藏、true显示
host_img: app.globalData.ImgPath,
index: 0, //选择的下拉列 表下标,
clientImgPath: clientImgPath,
hidden: false,//是否显示授权弹窗
},
// 外面的弹窗
btn: function () {
this.setData({
showModal: true
})
},
// 联系客服
callTel: function (e) {
wx.makePhoneCall({
phoneNumber: e.currentTarget.dataset.tel // 仅为示例,并非真实的电话号码
})
},
// 禁止屏幕滚动
preventTouchMove: function () {
},
// 弹出层里面的弹窗
ok: function () {
this.setData({
showModal: false
})
},
//获取 input值
bindKeyInput: function (e) {
console.log(e)
var that = this;
that.setData({
inputValue: e.detail.value,
inputLength: e.detail.cursor,
})
},
setUserInfo(e){ //点击了授权
if(e.detail){
this.opgetMemberInfo();
this.getBankList();
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow () {
if( !wx.getStorageSync('userInfo') ){
this.setData({ hidden:true });
return;
}
this.setData({ hidden:false });
this.opgetMemberInfo();
this.getBankList();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
// 点击下拉显示框
selectTap() {
this.setData({
show: !this.data.show,
});
},
// 点击下拉列表
optionTap(e) {
let that = this;
let bankid = e.currentTarget.dataset.bankid; //获取点击的下拉列表的下标
let index = e.currentTarget.dataset.index; //获取点击的下拉列表的下标
that.setData({
bankid: bankid,
bank_name_text: that.data.banklist[index]['bank_name'],
show: !that.data.show
});
//console.log(that.data.bank_name_text)
},
getBankList: function () {
let that = this;
getWxBankList().then(res => {
that.setData({
banklist: res.data,
bank_name_text: res.data[0]['bank_name']
})
}).catch(err=>{
if( res.data.code == -10800 ){
that.setData({ hidden:true });
}
})
},
formSubmit: function (e) {
console.log(e)
var that = this;
let formdata = e.detail.value;
let bank_id = that.data.bankid;
if (!that.data.bankid) {
bank_id = that.data.banklist[0]['id'];
}
if (!CheckBankNo(formdata.cardno)){
app.showModal({ content: "银行卡号不正确" });
return false
}
let params = {
formid: e.detail.formId,
cardno: formdata.cardno,
branch: formdata.branch,
realname: formdata.realname,
bank_id: bank_id,
}
// console.log('form发生了submit事件,携带数据为:', e)
addBank(params).then(res => {
if (res.code < 0) {
app.showModal({ content: res.msg })
} else {
/* app.showModal({
content: res.msg,
url: "/pages/personal/withdraw/bankCard_list/bankCard_list"
}) */
wx.navigateBack({
delta: 1
})
}
})
},
opgetMemberInfo:function(){
getMemberInfo().then(res => {
this.setData({
member: res.data.member,
});
})
},
})
function CheckBankNo(t_bankno) {
var bankno = t_bankno.trim();
console.log(bankno)
if (bankno == "") {
return false;
}
if (bankno.length < 15 || bankno.length > 20) {
return false;
}
//开头6位
var strBin = "10,18,30,35,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,60,62,65,68,69,84,87,88,94,95,98,99";
if (strBin.indexOf(bankno.substring(0, 2)) == -1) {
return false;
}
return true;
}
\ No newline at end of file
{
"usingComponents": {
},
"navigationBarTitleText": "添加银行卡"
}
<form bindsubmit="formSubmit" report-submit='true'>
<view class="boxs">
<view class="topboxss">
<view class="ali-c po_r" catchtap='selectTap'>
<view class="bt_hei sz_30 mr-20" style="width:30%">开户银行</view>
<view class="sz_30 bt_hei inputshuzi flex1">
<input bindinput="bindKeyInput" placeholder="请填写银行卡号" value="{{bank_name_text}}"
placeholder-class="sz_30 inp_hui"></input>
</view>
<view class="xiangxiaimg {{show&&'select_img_rotate'}}">
<image src="{{clientImgPath}}/images/uts/xiala_hui@2x.png"></image>
</view>
<view class='option_box' style='height:{{show?(banklist.length>5?420:banklist.length*60):0}}rpx;'>
<text class='option' style='{{index==banklist.length-1&&"border:0;"}}' wx:for='{{banklist}}' wx:key='this'
data-bankid='{{item.id}}' data-index='{{index}}' catchtap='optionTap'>{{item.bank_name}}</text>
</view>
</view>
<view class="xian"></view>
<view class="ali-c">
<view class="bt_hei sz_30 mr-20" style="width:30%">银行卡号</view>
<view class="sz_30 bt_hei inputshuzi flex1">
<input type="number" bindinput="bindKeyInput" name="cardno" placeholder="请填写银行卡号"
placeholder-class="sz_30 inp_hui"></input>
</view>
</view>
<view class="xian"></view>
<view class="ali-c">
<view class="bt_hei sz_30 mr-20" style="width:30%">开户行</view>
<view class="sz_30 bt_hei inputshuzi flex1">
<input bindinput="bindKeyInput" name="branch" placeholder="请填写开户行" placeholder-class="sz_30 inp_hui"></input>
</view>
</view>
<view class="xian"></view>
<view class="ali-c">
<view class="bt_hei sz_30 mr-20" style="width:30%">持卡人姓名</view>
<view class="sz_30 bt_hei inputshuzi flex1">
<input bindinput="bindKeyInput" name="realname" placeholder="请填写持卡人姓名"
disabled="{{member.realname?'true':''}}" value="{{member.realname}}"
placeholder-class="sz_30 inp_hui"></input>
</view>
<view class="sz_28 yuanha flexc te_ct" bindtap="btn"><text>!</text></view>
</view>
</view>
<button class="mt-50 {{inputLength == 0 ? 'buttons':'button'}}" formType="submit">确认添加</button>
</view>
</form>
<!-- 弹窗 -->
<!--index.wxml-->
<!-- 遮罩层 -->
<view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
<!-- 弹出层 -->
<view class="modalDlg" wx:if="{{showModal}}">
<view class="boxs">
<view class="sz_30 bt_heibl te_ct mb-40">持卡人说明</view>
<view class="ali-c mb-30">
<text class="sz_28 inp_hui">为了您的账户安全,只支持绑定当前持卡人姓名的银行卡。如需更换持卡人姓名请联系客服。</text>
</view>
</view>
<view class="xian"></view>
<view class="ali-z" style="height:100rpx;width:100%;">
<view style="width:49%;height:100rpx" class="flexc sz_30 bt_hei" bindtap='callTel'
data-tel='{{CONFIG.site.tel?CONFIG.site.tel:"18070409062"}}'>联系客服</view>
<view class="tapshuxian"></view>
<view style="width:49%;height:100rpx" class="flexc sz_30 c_ff" bindtap='ok'>知道了</view>
</view>
</view>
<!-- 登陆授权弹窗 -->
<login hidden="{{hidden}}" bind:setUserInfo="setUserInfo"/>
\ No newline at end of file
/* pages/personal//withdraw/bankCard/bankCard.wxss */
page{
background: rgba(245, 242, 242, 1);
}
.inputshuzi{
flex: 1;
height: 100rpx;
padding: 0 20rpx;
box-sizing: border-box;
}
.inputshuzi input{
flex: 1;
height: 100rpx;
}
.xiangxiaimg{
width:34rpx;
height:20rpx;
}
/* */
.select_img_rotate {
transform: rotate(180deg);
}
.option_box {
position: absolute;
top:100% ;
width: 100%;
border: 1px solid #efefef;
box-sizing: border-box;
height: 0;
overflow-y: auto;
border-top: 0;
background: #fff;
transition: height 0.3s;
z-index: 99
}
.option {
display: block;
line-height: 80rpx;
border-bottom: 1px solid #efefef;
padding: 10rpx;
color: rgb(102, 102, 102);
font-size: 30rpx;
background: #fff
}
.yuanha{
width: 30rpx;
height: 30rpx;
border: 1px solid #ccc;
border-radius: 50%;
color:#ccc ;font-weight: 500;
}
/* 遮罩层 */
.mask{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
z-index: 9000;
opacity: 0.5;
}
/* 弹出层 */
.modalDlg{
width: 70%;
position: fixed;
top: 30vh;
left: 0;
right: 0;
z-index: 9999;
margin: 0 auto;
background-color: #fff;
border-radius:5px;
display: flex;
flex-direction: column;
align-items: center;
}
.quxiaoimg{
width: 68rpx;
height: 68rpx;
position: fixed;
top: 68vh;
left: 0;
right: 0;
margin: 0 auto;
}
/* 弹出层里面的文字 */
.text{
text-align: justify;
font-size: 14px;
color: #666;
width: 180px;
margin-top: 10px;
}
.shoujiimg{
width: 30rpx;
height: 40rpx;
}
.inpbox{
flex: 1
}
.inpbox input{
flex: 1
}
\ No newline at end of file
const app = getApp();
import {
bankList,
deleteBank
} from '../../../../api/basicInformation.js';
var clientImgPath = app.globalData.clientImgPath;
Page({
/**
* 页面的初始数据
*/
data: {
host_img: app.globalData.ImgPath,
clientImgPath: clientImgPath,
hidden: false, //是否显示授权弹窗
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
that.setData({
type: options.type,
url: options.url ? unescape(options.url) : "",
})
},
setUserInfo(e){ //点击了授权
if(e.detail){
this.getUserBankList();
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow () {
if( !wx.getStorageSync('userInfo') ){
this.setData({ hidden:true });
return;
}
this.setData({ hidden:false });
this.getUserBankList();
},
// 跳转添加银行卡
bankCard: function (e) {
wx.navigateTo({
url: '/pages/personal/withdraw/bankCard/bankCard',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
handleTouchStart: function (e) {
this.startTime = e.timeStamp;
// console.log(" startTime = " + e.timeStamp);  
},
//touch end
handleTouchEnd: function (e) {
this.endTime = e.timeStamp;
///console.log(" endTime = " + e.timeStamp);  
},
handleClick: function (e) {
var that = this;
if (that.data.type) {
wx.redirectTo({
url: "/" + that.data.url + "?bank_id=" + e.currentTarget.dataset.id + '&type=' + that.data.type,
})
}
},
/**
* 长按解绑银行卡
*/
handleLongPress: function (e) {
let bankid = e.currentTarget.dataset.id;
let that = this;
app.showModal({
content: "确定解绑此银行卡",
showCancel: true,
confirm: function () {
//console.log(bankid);
if (bankid) {
that.opdeleteBank(bankid);
}
},
})
},
getUserBankList: function () {
let that = this;
bankList({}).then(res => {
let banklist = res.data;
banklist.forEach(function (value, index) {
if (banklist[index]['bank_code']) {
banklist[index]['bankbg'] = banklist[index]['bank_code'].toLowerCase();
}
if (banklist[index]['cardno']) {
banklist[index]['vcardno'] = '**** **** **** ' + banklist[index]['cardno'].substring(banklist[index]['cardno'].length - 4);
}
});
that.setData({
banklist: banklist,
})
}).catch(err=>{
if( res.data.code == -10800 ){
that.setData({ hidden:true });
}
})
},
opdeleteBank: function (bankid) {
let that = this;
deleteBank({
'bankid': bankid
}).then(res => {
that.getUserBankList();
});
}
})
\ No newline at end of file
{
"usingComponents": {
},
"navigationBarTitleText": "我的银行卡"
}
<view class="boxs">
<block wx:for='{{banklist}}' wx:key="index" wx:for-item="bank" wx:for-key="" >
<view class="box_yhk ov po_r mb-20" data-type="{{type}}" data-id="{{bank.id}}" bindtouchstart="handleTouchStart" bindtouchend="handleTouchEnd" bindlongpress="handleLongPress" bindtap="handleClick">
<view class="kaimg po_a"><image src="{{clientImgPath}}/images/bank/{{bank.bankbg}}.png"></image></view>
<view class="ali-c">
<view class="logoimg"></view>
<view class="ml-35">
<view class="katexta">{{bank.bank_name}}</view>
<view class="katextb">储蓄卡 </view>
</view>
</view>
<view class="katexta mt-25" style="margin-left: 101rpx">{{bank.vcardno}}</view>
</view>
</block>
<view class="konbtn flexc mt-50" bindtap="bankCard">
<view class="btnimg"><image src="{{clientImgPath}}/images/uts/jia@2x.png"></image></view>
<view class="sz_30 bt_hei ml-20" >添加银行卡</view>
</view>
</view>
<!-- 登陆授权弹窗 -->
<login hidden="{{hidden}}" bind:setUserInfo="setUserInfo"/>
\ No newline at end of file
/* pages/personal//withdraw/bankCard_list/bankCard_list.wxss */
page{
background: rgba(245, 242, 242, 1);
}
.kaimg{
top: 0;
bottom: 0;
left: 0;right: 0;width: 100%;height: 100%;
z-index: -1
}
.logoimg{
width:66rpx;
height:66rpx;
}
.box_yhk{
width: 100%;
border-radius: 10rpx;
padding: 10rpx 0;
box-sizing: border-box;
}
.katexta{
font-size:30rpx;
font-weight:bold;
color:rgba(255,255,255,1);
}
.katextb{
font-size:22rpx;
font-weight:500;
color:rgba(255,255,255,1);
}
.konbtn{
width:100%;
height:88rpx;
border:1px solid rgba(255,105,0,1);
border-radius:5rpx;
}
.btnimg{
width:46rpx;
height:46rpx;
}
\ No newline at end of file
const app = getApp();
import {
userWithdraw,
cashBank,
userTransferMoney
} from '../../../api/user.js';
import {
havepassword
} from '../../../api/basicInformation.js';
Page({
/**
* 页面的初始数据
*/
data: {
clientImgPath: app.globalData.clientImgPath,
currentTab: 0,
inputLength: 0,
inputLengths: 0,
is_cash: true,
ismoneyshow:false,
iShidden:false,//授权弹窗是否显示
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
gold: options.gold,
type: options.type ? options.type : 0, //type(0佣金提现,1代理提现,2商家提现)
member: app.globalData.userInfo,
bank_id: options.bank_id ? options.bank_id : 0,
currentTab: options.bank_id ? 2 : 0,
})
},
// 跳转银行卡列表
bankCardList: function (e) {
var type = e.currentTarget.dataset.type;
wx.navigateTo({
url: '/pages/personal/withdraw/bankCard_list/bankCard_list?url=' + app.getCurrentPageUrl() + '&type=' + type,
})
},
//验证身份时 用户在组件内点击提交按钮后 返回用户手机号码和验证码
formsubmit(data){
let postparams = this.data.params||{};
let verify = data.detail;
let params ={};
delete verify.type; //true
Object.assign(params, postparams, verify);
this.optWithdraw(params);
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
if( !wx.getStorageSync('userInfo') ){
this.setData({ hidden:true });
return;
}
this.setData({ hidden:false });
this.onLoadFun();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
//测试弹出
//this.selectComponent("#VerifyIdentity").showModal();
},
// 支付密码弹窗组件
showInputLayer: function (e) {
var that = this;
if (parseInt(that.data.money * 100) > parseInt(e.currentTarget.dataset.money * 100)) {
app.showModal({
content: "输入金额超过可提现余额!"
})
return;
}
havepassword({}).then(ret => {
if (ret.code == 0) {
if (this.data.money > 0) {
if (this.data.totype == 1) {
if (!this.data.bank_realname) {
app.showModal({
content: "请输入真实姓名!"
})
return;
}
}
if (this.data.totype == 2) {
if (!this.data.user_bank_id) {
app.showModal({
content: "请选择银行卡信息!"
})
return;
}
}
this.selectComponent("#paymentCode").showInputLayer();
} else {
app.showModal({
content: "您输入的金额不合法!"
})
return;
}
} else {
wx.showModal({
title: '温馨提示',
content: '您还未设置鹿马支付密码,请前往设置!',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/personal/set/payment_code/payment_code',
})
}
}
})
}
})
},
allMoney: function (e) {
var that = this;
var type = e.currentTarget.dataset.type;
if (type == 0) {
that.setData({
money: e.currentTarget.dataset.commission,
ismoneyshow: !that.data.ismoneyshow
})
} else if (type == 1) {
that.setData({
money: e.currentTarget.dataset.agent_brokerage,
ismoneyshow: !that.data.ismoneyshow
})
} else if (type == 2) {
that.setData({
money: e.currentTarget.dataset.gold, //这里商户全部提现减少100元的保证金
ismoneyshow: !that.data.ismoneyshow
})
}
console.log(that.data.ismoneyshow)
},
setUserInfo(e){ //点击了授权
if(e.detail){
this.onLoadFun();
}
},
onLoadFun(e) {
let params = {
bank_id: this.data.bank_id,
hasuser:true,
};
cashBank(params).then(res => {
let banklist = res.data.bank;
if (banklist) {
if (banklist['bank_code']) {
banklist['bankbg'] = banklist['bank_code'].toLowerCase();
}
if (banklist['cardno']) {
banklist['vcardno'] = '**** **** **** ' + banklist['cardno'].substring(banklist['cardno'].length - 4);
}
}
let realname = banklist ? banklist['realname'] : '';
this.setData({
bank: banklist,
bank_realname: res.data.cash ? res.data.cash.bank_realname : realname,
deposit: res.data.deposit,
account:res.data.account
})
}).catch(err=>{
if( res.data.code == -10800 ){
this.setData({ hidden:true });
}
})
},
//提现微信,银行卡
userWithdraw: function (e) {
var that = this;
var formData = e.detail.value;
if (that.data.is_cash == true) {
// that.setData({
// is_cash: false
// })
let paytitle = formData.totype == 1 ? '提现到微信' : "提现到银行卡"
that.setData({
type: that.data.type,
money: formData.money,
totype: formData.totype,
paytype: 'paytoweixin',
bank_realname: formData.bank_realname ? formData.bank_realname : null,
user_bank_id: formData.user_bank_id ? formData.user_bank_id : null,
paytitle: paytitle,
formId: formData.formId
})
}
},
//提现余额
userTransferMoney: function (e) {
var that = this;
var formData = e.detail.value;
that.setData({
money: formData.money,
paytitle: '提现到余额',
totype: 0
})
},
//输入密码提交事件 输入密码组件回调这个方法
submitpwd(e) {
var that = this;
let paw_val = e.detail.pwd;
//console.log("here");
if (that.data.is_cash == true) {
that.setData({
is_cash: false
})
//佣金提现到鹿马余额
if (that.data.totype == 0) {
let params = {
type: that.data.type,
money: that.data.money,
paypassword: e.detail.pwd
};
userTransferMoney(params).then(res => {
that.setData({
is_cash: true
})
if (res.code < 0) {
app.showModal({
content: res.msg
})
} else {
wx.navigateTo({
url: "/pages/personal/transfer/transfer_succeed/transfer_succeed?type=转账余额&money=" + that.data.money
})
}
})
} else if (that.data.totype == 1 || that.data.totype == 2) {
let params = {
type: that.data.type,
money: that.data.money,
totype: that.data.totype,
bank_realname: that.data.bank_realname,
user_bank_id: that.data.user_bank_id,
paw_val: paw_val,
};
this.optWithdraw(params);
}else{
app.showModal({
content: "非法操作!"
})
}
}
},
optWithdraw:function(params){
let that =this;
userWithdraw(params).then(res => {
that.setData({
is_cash: true
})
if (res.code == 0) {
this.selectComponent("#VerifyIdentity").hideModal();//信息验证成功后关闭弹窗
wx.navigateTo({
url: "/pages/personal/withdraw/withdrawal_success/withdrawal_success?type=" + that.data.totype + "&money=" + that.data.money + "&intro=" + (that.data.bank ? that.data.bank.bank_name : '')
})
} else {
if(res.code ==-2){
//要求手机验证码
that.setData({
params: params
})
this.selectComponent("#VerifyIdentity").showModal();
}else{
app.showModal({
content: res.msg
})
}
}
})
},
//获取 input值
bindKeyInput: function (e) {
var that = this;
that.setData({
inputValue: e.detail.value,
inputLength: e.detail.cursor,
})
//console.log(that.data.inputValue)
//console.log(that.data.inputLength)
},
//获取 input 2值
bindKeyInputs: function (e) {
var that = this;
that.setData({
inputValues: e.detail.value,
inputLengths: e.detail.cursor,
})
},
//点击切换
clickTab: function (e) {
//debugger;
var that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab: e.target.dataset.current,
})
}
},
})
\ No newline at end of file
{
"usingComponents": {
"paymentCode": "/components/dialog/paymentCode/paymentCode",
"VerifyIdentity": "/components/VerifyIdentity/VerifyIdentity"
},
"navigationBarTitleText": "佣金提现",
"navigationBarBackgroundColor": "#f64f15",
"navigationBarTextStyle": "white"
}
\ No newline at end of file
<view class="beijing"></view>
<view class="boxs">
<view class="sz_30 c_bi te_ct mb-20">可提现佣金</view>
<view class="sz_72 c_bi te_ct mb-50" style="font-weight:bold;">
<block wx:if="{{type==0}}">{{member.commission}}</block>
<block wx:elif="{{type==1}}">{{member.agent_brokerage}}</block>
<block wx:elif="{{type==2}}">{{gold}}</block>
</view>
<view class="topboxs ov" style="padding: 0;">
<view class="flex">
<view class="te_ct flex1 {{currentTab==0?'btnbeij':'btnbeijs'}}" data-current="0" bindtap="clickTab" style="width:33.33%;">
<view class="topimg br_10 ov">
<image data-current="0" bindtap="clickTab" src="{{clientImgPath}}/images/uts/weixinfang.png"></image>
</view>
<view class="sz_30 mt-20 max_hui" data-current="0" bindtap="clickTab">提现到微信</view>
</view>
<view class="te_ct {{currentTab==1?'btnbeij':'btnbeijs'}}" data-current="1" bindtap="clickTab" style="width:33.33% ">
<view class="topimg br_10 ov">
<image data-current="1" bindtap="clickTab" src="{{clientImgPath}}/images/uts/zhuanzhangss.png"></image>
</view>
<view class="sz_30 mt-20 max_hui" data-current="1" bindtap="clickTab">提现到余额</view>
</view>
<view class="te_ct flex1 {{currentTab==2?'btnbeij':'btnbeijs'}}" data-current="2" bindtap="clickTab" style="width:33.33%">
<view class="topimg br_10 ov">
<image data-current="2" bindtap="clickTab" src="{{clientImgPath}}/images/uts/yinhangka.png"></image>
</view>
<view class="sz_30 mt-20 max_hui" data-current="2" bindtap="clickTab">提现到银行卡</view>
</view>
</view>
</view>
<!-- 1 -->
<view class="{{currentTab==0?'tshow':'hidden'}}">
<form bindsubmit="userWithdraw" >
<input type="hidden" name="totype" value="1" style="display:none"></input>
<view class="topbox_20 mt-20">
<view class="ali-c">
<view class="sz_30 bt_hei flex1">
提现佣金
</view>
<view class="c_ff sz_30" bindtap="allMoney" data-type="{{type}}" data-commission="{{member.commission}}" data-agent_brokerage="{{member.agent_brokerage}}" data-gold="{{gold}}">全部提现</view>
</view>
<view class="dj-b mt-50">
<view class="bt_min mb-20">¥</view>
<view class="sz_72 ipt_ho inputshuzi">
<input type="digit" name="money" value="{{money}}" bindinput="bindKeyInput" placeholder="0.00" placeholder-class="sz_72 ipt_hui"></input>
</view>
</view>
<view class="xian"></view>
<view class="ali-c mt-40 mb-30">
<view class="sz_30 bt_hei">真实姓名</view>
<view class="c_ff sz_30 ">(必填项)</view>
</view>
<view class="sz_30 bt_hei inputtext mt-20">
<input placeholder="请填写微信实名认证的真实姓名" name="bank_realname" value="{{bank_realname}}" type="text" maxlength="10" placeholder-class="sz_30 inp_hui" bindinput="bindKeyInput"></input>
</view>
</view>
<view class="sz_24 inp_hui mt-30" style="color:#f64f15">温馨提示:提现到微信零钱预计两小时内到达,提现到银行卡正常到账时间为T+1,节假日顺延;提现时间为:8:00-21:00</view>
<button class=" mt-50 {{inputLength == 0? 'buttons':'button'}} {{ismoneyshow==false? 'buttons':'button'}}" wx:if="{{type==0}}" data-money='{{member.commission}}' form-type="submit" bindtap="showInputLayer">申请提现</button>
<button class=" mt-50 {{inputLength == 0? 'buttons':'button'}} {{ismoneyshow==false? 'buttons':'button'}}" wx:elif="{{type==1}}" data-money='{{member.agent_brokerage}}' form-type="submit" bindtap="showInputLayer">申请提现</button>
<button class=" mt-50 {{inputLength == 0? 'buttons':'button'}} {{ismoneyshow==false? 'buttons':'button'}}" wx:elif="{{type==2}}" data-money='{{gold}}' form-type="submit" bindtap="showInputLayer">申请提现</button>
<view class="flexc mt-60" >
<view class="flexc mr-50">
<navigator class="sz_32 xi_hui" url="/pages/personal/Ishop/wxStep/wxStep" hover-class="none">了解微信实名认证</navigator>
<view class="xiangyouimg ml-10">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
<view class="flexc">
<navigator class="sz_32 xi_hui" url="/pages/personal/withdraw/withdraw_record/withdraw_record" hover-class="none">查看提现记录</navigator>
<view class="xiangyouimg ml-10">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
</view>
</form>
</view>
<!-- 2 -->
<view class="{{currentTab==1?'tshow':'hidden'}}">
<form bindsubmit="userTransferMoney">
<view class="topbox_20 mt-20">
<view class="ali-c">
<view class="sz_30 bt_hei flex1">
转出佣金
</view>
<view class="c_ff sz_30" bindtap="allMoney" data-type="{{type}}" data-commission="{{member.commission}}" data-agent_brokerage="{{member.agent_brokerage}}" data-gold="{{member.gold}}">全部提现</view>
</view>
<view class="dj-b mt-50">
<view class="bt_min mb-20">¥</view>
<view class="sz_72 ipt_ho inputshuzi">
<input type="digit" name="money" value="{{money}}" bindinput="bindKeyInput" placeholder="0.00" placeholder-class="sz_72 ipt_hui"></input>
</view>
</view>
</view>
<view class="sz_24 inp_hui mt-30">温馨提示:请认真核对转出佣金,一旦转出成功不可退回。</view>
<button class=" mt-50 {{inputLength == 0 ? 'buttons':'button'}} {{ismoneyshow==false? 'buttons':'button'}}" form-type="submit" bindtap="showInputLayer">确定转出</button>
</form>
<view class="flexc mt-50">
<navigator class="sz_32 xi_hui" url="/pages/personal/withdraw/withdraw_record/withdraw_record" hover-class="none">查看提现记录</navigator>
<view class="xiangyouimg ml-10">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
</view>
<!-- 3 -->
<view class="{{currentTab==2?'tshow':'hidden'}}">
<form bindsubmit="userWithdraw">
<input type="hidden" name="totype" value="2" style="display:none"></input>
<input type="hidden" name="user_bank_id" value="" style="display:none"></input>
<view class="topbox_20 mt-20">
<view class="ali-c">
<view class="sz_30 bt_hei flex1">
提现佣金
</view>
<view class="c_ff sz_30" bindtap="allMoney" data-type="{{type}}" data-commission="{{member.commission}}" data-agent_brokerage="{{member.agent_brokerage}}" data-gold="{{gold}}">全部提现</view>
</view>
<view class="dj-b mt-50">
<view class="bt_min mb-20">¥</view>
<view class="sz_72 ipt_ho inputshuzi">
<input type="digit" name="money" value="{{money}}" bindinput="bindKeyInputs" placeholder="0.00" placeholder-class="sz_72 ipt_hui"></input>
</view>
</view>
<view class="xian"></view>
<view class=" mt-40 mb-30">
<!-- 有银行卡 -->
<block wx:if="{{bank}}">
<view class="sz_30 bt_hei">到账银行卡</view>
<view class="ali-c mt-30" data-type="{{type}}" bindtap="bankCardList">
<view class="touxiangimg ov">
<image src="{{clientImgPath}}/images/bank/logo/{{bank.bankbg}}.png"></image>
</view>
<view class="ml-20 flex1">
<view class="sz_30 bt_hei">{{bank.bank_name}}</view>
<view class="sz_30 inp_hui mt-10">储蓄卡 {{bank.vcardno}}</view>
</view>
<view class="xiangyouimg ml-10">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
<input type="text" name="user_bank_id" value="{{bank_id?bank_id:bank.id}}" style="display:none"></input>
</block>
<!-- 无银行卡 -->
<block wx:else>
<view class="ali-c mt-40 mb-30">
<view class="sz_30 bt_hei">到账银行卡</view>
<view class="c_ff sz_30 ">(必填项)</view>
</view>
<view class="sz_30 inp_hui inputtext ali-z mt-20" bindtap="bankCardList">请添加银行卡
<view class="xiangyouimg ml-10">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
</block>
<!-- s -->
</view>
</view>
<view class="sz_24 max_hui mt-30">温馨提示:单笔最少提现1000元,单笔最多提现5000元;到账时间为T+1</view>
<button class="mt-50 {{inputLengths == 0 ? 'buttons':'button'}} {{ismoneyshow==false? 'buttons':'button'}}" wx:if="{{type==0}}" data-money='{{member.commission}}' form-type="submit" bindtap="showInputLayer">T+1到账,申请提现</button>
<button class="mt-50 {{inputLengths == 0 ? 'buttons':'button'}}" wx:elif="{{type==1}}" data-money='{{member.agent_brokerage}}' form-type="submit" bindtap="showInputLayer">T+1到账,申请提现</button>
<button class="mt-50 {{inputLengths == 0 ? 'buttons':'button'}}" wx:elif="{{type==2}}" data-money='{{gold}}' form-type="submit" bindtap="showInputLayer">T+1到账,申请提现</button>
<view class="flexc mt-50">
<navigator class="sz_32 xi_hui" url="/pages/personal/withdraw/withdraw_record/withdraw_record" hover-class="none">查看提现记录</navigator>
<view class="xiangyouimg ml-10">
<image src="{{clientImgPath}}/images/uts/quanbu@2x.png"></image>
</view>
</view>
</form>
</view>
</view>
<!-- 支付弹窗 -->
<paymentCode id='paymentCode' title="{{paytitle}}" money="{{money}}" bind:submitpwd="submitpwd" />
<VerifyIdentity phone="{{account.mobile}}" type="1" id='VerifyIdentity' bind:formsubmit="formsubmit"></VerifyIdentity>
<!-- 验证身份组件 用于大金额或者铭感操作时 通过手机号码验证身份 -->
<!-- 登陆授权弹窗 -->
<login hidden="{{hidden}}" bind:setUserInfo="setUserInfo"/>
\ No newline at end of file
/* pages/personal//withdraw/withdraw.wxss */
page{
position: relative;
background: rgba(245, 242, 242, 1);
}
.beijing{
position: absolute;
top: 0;
width: 100%;
height: 320rpx;
background: #f64f15;
z-index: -1
}
.btnbeij{
padding: 20rpx 0;
box-sizing: border-box;
background: #FFF1E9;
}
.btnbeijs{
padding: 20rpx 0;
box-sizing: border-box;
}
.topimg{
width:88rpx;
height:88rpx;
margin: 0 auto;
}
.inputpl{
font-size:30rpx;
font-weight:500;
color:rgba(222,222,222,1);
}
.inputbox{
flex: 1;
padding: 0 20rpx;
box-sizing: border-box;
}
.inputshuzi{
flex: 1;
height: 100rpx;
padding: 0 20rpx;
box-sizing: border-box;
}
.inputshuzi input{
flex: 1;
height: 100rpx;
}
.inputtext{
flex: 1;
}
.haoyouimg{
width:40rpx;
height:40rpx;
}
.xiangyouimg{
width:14rpx;
height:24rpx;
}
.touxiangimg{
width:96rpx;
height:96rpx;
border-radius:50%;
}
\ No newline at end of file
const app = getApp();
import {userCashList,userLogs} from '../../../../api/user.js';
Page({
/**
* 页面的初始数据
*/
data: {
income:'',
clientImgPath: app.globalData.clientImgPath,
currentTab: 0,
// date: '2019年5月8日',
datePickerValue: ['', '', ''],
datePickerValuea: "2019",
datePickerValueb: "11",
datePickerIsShow: false,
cashlist: [],
pageNum: 0,
is_loading_done: false, //是否显示加载完,默认没有加载完
array:[
{type:'',text:'全部'},
{type:'user',text:'用户'},
{type:'agent',text:'代理'},
{type:'shop',text:'商户'}
],
index:0,
type:'',
},
bindPickerChange(e){
this.setData({
cashlist: [],
pageNum: 0,
is_loading_done: false,
index:e.detail.value,
type:this.data.array[e.detail.value].type
});
this.initializedata();
},
//点击切换
clickTab: function (e) {
var that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab: e.target.dataset.current,
cashlist: [],
pageNum: 0,
is_loading_done: false,
});
that.initializedata();
}
},
// 日期
showDatePicker: function (e) {
this.setData({
datePickerIsShow: true,
});
},
datePickerOnSureClick: function (e) {
var that = this;
this.setData({
//date: `${e.detail.value[0]}年${e.detail.value[1]}月${e.detail.value[2]}日`,
date: e.detail.value[0] + "-" + e.detail.value[1],
datePickerValue: e.detail.value,
datePickerValuea: e.detail.value[0],
datePickerValueb: e.detail.value[1],
datePickerValuec: e.detail.value[2],
datePickerIsShow: false,
cashlist: [],
pageNum: 0,
is_loading_done: false,
});
that.initializedata();
},
datePickerOnCancelClick: function (event) {
this.setData({
datePickerIsShow: false,
cashlist: [],
pageNum: 0,
is_loading_done: false,
});
that.initializedata();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that=this;
that.initializedata();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function (e) {
var that = this;
var pageNum = that.data.pageNum;
that.setData({
pageNum: 0,
is_loading_done: false,
cashlist: [],
})
wx.showToast({
title: '正在刷新',
icon: 'loading',
mask: true
})
that.initializedata();
wx.stopPullDownRefresh();
},
loadmore: function () {
var that = this;
var pageNum = that.data.pageNum;
that.setData({
pageNum: pageNum + 1
})
that.initializedata();
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function (e) {
var that = this;
var is_loading_done = that.data.is_loading_done; //是否加载完毕
if (is_loading_done == false) { //还没加载完毕则继续加载
wx.showLoading({
title: '加载中',
mask: false
})
that.loadmore();
} else {
wx.showLoading({
title: '已全部加载完毕',
mask: false
})
setTimeout(function () {
wx.hideLoading()
}, 1000)
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
//提现日志
initializedata:function(){
var that=this;
if (that.data.currentTab==0){
let params = {
mothtime: that.data.date,
page: that.data.pageNum + 1,
type:this.data.type
};
userCashList(params).then(res => {
console.log(res);
if (res.data.list == null || res.data.list.length == 0) {
that.setData({
currentMoth: res.data.currentMoth,
expend: res.data.expend,
is_loading_done: true,
})
} else {
var cash_list = that.data.cashlist;
cash_list = cash_list.concat(res.data.list);
that.setData({
currentMoth: res.data.currentMoth,
expend: res.data.expend,
cashlist: cash_list
})
}
wx.hideLoading();
})
}else{
let params = {
source: 1,
mothtime: that.data.date,
page: that.data.pageNum + 1,
};
userLogs(params).then(res => {
console.log(res);
if (res.data.list == null || res.data.list.length == 0) {
that.setData({
currentMoth: res.data.currentMoth,
income: res.data.income,
is_loading_done: true,
})
} else {
var cash_list = that.data.cashlist;
cash_list = cash_list.concat(res.data.list);
that.setData({
currentMoth: res.data.currentMoth,
income: res.data.income,
cashlist: cash_list
})
}
wx.hideLoading();
})
}
}
})
\ No newline at end of file
{
"usingComponents": {
"date-picker": "/components/dialog/date-picker/date-picker"
},
"navigationBarTitleText": "提现记录"
}
\ No newline at end of file
<view class="boxs">
<view class="tapbox ali-z">
<view class="topzi {{currentTab==0?'topzis':''}}" data-current="0" bindtap="clickTab">提现</view>
<view class="topzi {{currentTab==1?'topzis':''}}" data-current="1" bindtap="clickTab">转出</view>
</view>
<!-- 2 -->
<view class="{{currentTab==0?'tshow':'hidden'}}">
<view class="ali-z mt-30">
<view class="ali-c">
<view class="ali-c" bindtap="showDatePicker">
<view class="sz_30 xiala_hui">{{currentMoth}}</view>
<view class="xiangxiaimg ml-10">
<image src="{{clientImgPath}}/images/index/xiala_hui@2x.png"></image>
</view>
</view>
<view class="ali-c ml-40" >
<picker
bind:change="bindPickerChange"
value="{{index}}"
range-key='text'
range="{{array}}"
>
<view class="">{{array[index].text}}</view>
</picker>
<image
class="xiangxiaimg ml-10"
src="{{clientImgPath}}/images/index/xiala_hui@2x.png"
>
</image>
</view>
</view>
<view class="sz_28 xi_hui te_cr">
<view>提现:{{expend || 0}}</view>
</view>
</view>
<!-- 无数据显示图片 -->
<view class="meiyous" wx:if='{{cashlist.length==0}}'><image src="{{clientImgPath}}/images/uts/meiyoule.png"></image></view>
<!-- s -->
<view class="topbox_20 mt-20" wx:if='{{cashlist.length>0}}'>
<black wx:for='{{cashlist}}' wx:key='index'>
<view class="ali-c">
<view class="touxiangimg ov"><image src="{{clientImgPath}}/images/uts/{{item.totype==1?'weixinfang':'yinhangka'}}.png"></image></view>
<view class="ml-40 wh_f1">
<view class="ali-z">
<view class='bt_hei sz_32 ali-c'>
{{item.totype==1?"提现到微信":"提现到银行卡"}}
<text class="s26" style="color:#FF6900;line-height: 6rpx;">
{{item.type=='user'?'( 用户提现 )':item.type=='shop'?'( 商户提现 )':'( 代理提现 )'}}
</text>
</view>
</view>
<view class='sz_28 mt-10 xi_hui oneline wh_f1'>{{item.addtime}}</view>
<view class="sz_28 xi_hui mt-10" wx:if="{{item.reason}}">备注:{{item.reason}}</view>
</view>
<view class="ml-20 te_cr">
<view class="shuiliangb">+{{item.money}}</view>
<view class="c_ff sz_30"><block wx:if="{{item.status==0}}">提现中</block><block wx:if="{{item.status==2}}">提现失败</block></view>
</view>
</view>
<view class="xian mt-20 mb-20" data-jj="index" wx:if='{{index!=cashlist.length-1}}'></view>
</black >
</view>
</view>
<!-- 1 -->
<view class="{{currentTab==1?'tshow':'hidden'}}">
<view class="ali-z mt-30">
<view class="ali-c" bindtap="showDatePicker">
<view class="sz_30 xiala_hui">{{currentMoth}}</view>
<view class="xiangxiaimg ml-10"><image src="{{clientImgPath}}/images/index/xiala_hui@2x.png"></image></view>
</view>
<view class="sz_28 xi_hui te_cr">
<view class="mb-10">转出:{{income}}</view>
</view>
</view>
<!-- 无数据显示图片 -->
<view class="meiyous" wx:if='{{cashlist.length==0}}'><image src="{{clientImgPath}}/images/uts/meiyoule.png"></image></view>
<!-- s -->
<view class="topbox_20 mt-20" wx:if='{{cashlist.length>0}}'>
<black wx:for='{{cashlist}}' wx:key='index' wx:for-item="item">
<view class="ali-c">
<view class="touxiangimg ov"><image src="{{clientImgPath}}/images/uts/zhuanzhangss.png"></image></view>
<view class="ml-40 wh_f1">
<view class="ali-z">
<view class='bt_hei sz_32'>{{item.intro}}</view>
</view>
<view class='sz_28 mt-20 xi_hui oneline wh_f1'>{{item.createtime}}</view>
</view>
<view class="shuiliangb ml-20">+{{item.money}}</view>
</view>
<view class="xian mt-20 mb-20" data-jj="index" wx:if='{{index!=cashlist.length-1}}'></view>
</black >
</view>
</view>
</view>
<!-- 时间控件-s -->
<date-picker
id="date-picker"
value="{{datePickerValue}}"
isShow="{{datePickerIsShow}}"
bindsureclick="datePickerOnSureClick"
bindcancelclick="datePickerOnCancelClick"/>
<!-- 时间控件-e -->
/* pages/personal//withdraw/withdraw_record/withdraw_record.wxss */
page{
background: rgba(245, 242, 242, 1);
}
.tapbox{
width:100%;
height:88rpx;
background:rgba(255,255,255,1);
border-radius:15rpx;
padding:0 100rpx;
box-sizing: border-box;
line-height: 88rpx;
}
.topzi{
height:100%;
display: inline;
font-size:32rpx;
font-weight:500;
color:rgba(0,0,0,1);
}
.topzis{
height:100%;
display: inline;
font-size:32rpx;
font-weight:500;
color:rgba(0,0,0,1);
border-bottom: 2px solid #f64f15;
box-sizing: border-box;
}
/* 日期 */
.riqi_wrap{
width: 100%;
box-sizing: border-box;
padding: 0 100rpx 0 83rpx;
height: 81rpx;
line-height: 81rpx;
background-color: #fafafa;
}
.riqi_left_box{
width: 50%;
height: 100%;
float: left;
text-align: center;
font-family: PingFang-SC-Regular;
font-size: 34rpx;
color: #333333;
display: flex;
/* justify-content: center; */
align-items: center;
}
.riqi_img{
width: 34rpx;
height: 34rpx;
display: inline-block;
margin-left: 30rpx;
}
.riqi_img image{
width: 100%;
height: 100%;
display: block;
}
.shouyi_right_box{
width: 50%;
height: 100%;
float: left;
text-align: right;
font-family: PingFang-SC-Regular;
font-size: 34rpx;
color: #333333;
}
.shuiliangb{
font-size:36rpx;
font-weight:600;
color:rgb(0, 0, 0);
}
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
arr:true,
clientImgPath: app.globalData.clientImgPath,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
that.setData({
type: options.type ? options.type : "1",
money: options.money ? options.money : 0,
intro: options.intro ? options.intro : "",
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
gotCash:function(){
wx.navigateBack({
delta: 2
})
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "提现成功"
}
\ No newline at end of file
<view class="boxs">
<view class="fangbox_a">
<view class="tubimg"><image src="{{clientImgPath}}/images/uts/querenmax.png"></image></view>
<view class="sz_28 bt_hei te_ct">申请成功</view>
<view class="sz_60 bt_heibl te_ct mt-30 mb-20">¥{{money}}</view>
</view>
<view class="fangbox_b mt-20">
<view class="ali-z" style="height:100rpx">
<view class="bt_hei sz_30">方式</view>
<!-- 判断提现的状态 -->
<view class="ali-c" wx:if='{{type==1}}'>
<view class="logoimg"><image src="{{clientImgPath}}/images/uts/weixinfang.png"></image></view>
<view class="sz_30 xi_hui ml-10">微信钱包</view>
</view>
<view class="ali-c" wx:else>
<!-- <view class="logoimg"><image src="{{clientImgPath}}/images/uts/gongshang.png"></image></view> -->
<view class="sz_30 xi_hui ml-10">{{intro}}</view>
</view>
</view>
<view class="xian"></view>
<view class="bt_hei sz_30 mt-30 mb-35">状态</view>
<view class="flex ">
<view class="dian mr-20 mt-10"></view>
<view class="bt_hei sz_30 flex1 mb-30">
<text wx:if='{{type==1}}'> 申请已成功,请您注意查收,到账时间预计2两小时内。</text>
<text wx:else> 申请已提交等待银行处理;提现到账时间为T+1,请您耐心等待。</text>
<view class="sz_24 inp_hui mt-15"></view>
</view>
</view>
</view>
<!-- <view class="fangbox_c mt-20">
<view class="ali-z" style="height:100rpx">
<view class="bt_hei sz_30">温馨提醒</view>
</view>
<view class="sz_24 inp_hui mt-15">1.未开通微信零钱秒到商户到账时间为T+1;用户佣金提现微信零钱</view>
<view class="sz_24 inp_hui mt-15 mb-20">2.节假日申请提现,到账时间将顺延。</view>
</view> -->
<button class="button mt-60" bindtap="gotCash">知道了</button>
</view>
/* pages/personal//withdraw/withdrawal_success/withdrawal_success.wxss */
page{
background: rgba(245, 242, 242, 1);
}
.tubimg{
width:121rpx;
height:121rpx;
margin: 45rpx auto 20rpx;
}
.dian{
width:24rpx;
height:24rpx;
background:#f64f15;
border-radius:50%;
}
.logoimg{
width:34rpx;
height:34rpx;
border-radius:50%;
overflow: hidden;
}
\ No newline at end of file
var city = require('../../utils/city.js');
var app = getApp()
Page({
data: {
searchLetter: [],
showLetter: "",
winHeight: 0,
// tHeight: 0,
// bHeight: 0,
cityList: [],
isShowLetter: false,
scrollTop: 0,//置顶高度
scrollTopId: '',//置顶id
city: "上海市",
hotcityList: [{ cityCode: 110000, city: '北京市' }, { cityCode: 310000, city: '上海市' }, { cityCode: 440100, city: '广州市' }, { cityCode: 440300, city: '深圳市' }, { cityCode: 330100, city: '杭州市' }, { cityCode: 320100, city: '南京市' }, { cityCode: 420100, city: '武汉市' }, { cityCode: 410100, city: '郑州市' }, { cityCode: 120000, city: '天津市' }, { cityCode: 610100, city: '西安市' }, { cityCode: 510100, city: '成都市' }, { cityCode: 500000, city: '重庆市' }]
},
onLoad: function () {
// 生命周期函数--监听页面加载
var searchLetter = city.searchLetter;
var cityList = city.cityList();
var sysInfo = wx.getSystemInfoSync();
var winHeight = sysInfo.windowHeight;
var itemH = winHeight / searchLetter.length;
var tempObj = [];
for (var i = 0; i < searchLetter.length; i++) {
var temp = {};
temp.name = searchLetter[i];
temp.tHeight = i * itemH;
temp.bHeight = (i + 1) * itemH;
tempObj.push(temp)
}
this.setData({
winHeight: winHeight,
itemH: itemH,
searchLetter: tempObj,
cityList: cityList
})
},
onReady: function () {
// 生命周期函数--监听页面初次渲染完成
},
onShow: function () {
// 生命周期函数--监听页面显示
},
onHide: function () {
// 生命周期函数--监听页面隐藏
},
onUnload: function () {
// 生命周期函数--监听页面卸载
},
onPullDownRefresh: function () {
// 页面相关事件处理函数--监听用户下拉动作
},
onReachBottom: function () {
// 页面上拉触底事件的处理函数
},
clickLetter: function (e) {
console.log(e.currentTarget.dataset.letter)
var showLetter = e.currentTarget.dataset.letter;
this.setData({
showLetter: showLetter,
isShowLetter: true,
scrollTopId: showLetter,
})
var that = this;
setTimeout(function () {
that.setData({
isShowLetter: false
})
}, 1000)
},
//选择城市
bindCity: function (e) {
console.log("bindCity")
this.setData({ city: e.currentTarget.dataset.city })
},
//选择热门城市
bindHotCity: function (e) {
console.log("bindHotCity")
this.setData({
city: e.currentTarget.dataset.city
})
},
//点击热门城市回到顶部
hotCity: function () {
this.setData({
scrollTop: 0,
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "切换城市"
}
\ No newline at end of file
<!-- 搜索框 -->
<view class='list-search' >
<view class='list-search-box'>
<icon type="search" size="15" />
<input placeholder="输入您要搜索的城市" bindinput='input' />
</view>
<button class='search-button'>搜索</button>
</view>
<view>
</view>
<view class="searchLetter touchClass">
<view class="thishotText" bindtap="hotCity">
<view style="margin-top:0;">当前</view>
<view style="margin-top:0;">热门</view>
</view>
<view wx:for="{{searchLetter}}" style="color:#2ab4ff;font-size:20rpx;" wx:key="index" data-letter="{{item.name}}" catchtouchend="clickLetter" >{{item.name}}</view>
</view>
<block wx:if="{{isShowLetter}}">
<view class="showSlectedLetter">
{{showLetter}}
</view>
</block>
<scroll-view scroll-y="true" style="height:{{winHeight}}px" bindscroll="bindScroll"
scroll-into-view="{{scrollTopId}}" scroll-top="{{scrollTop}}">
<view class="hotcity-common thisCity">当前选择城市</view>
<view class="thisCityName">{{city}}</view>
<view>
<text class="hotcity hotcity-common">热门城市</text>
<view class="weui-grids">
<block wx:for-items="{{hotcityList}}" wx:key="{{index}}">
<view class="weui-grid" data-cityCode="{{item.cityCode}}" data-city="{{item.city}}" bindtap="bindHotCity" >
<view class="weui-grid__label">{{item.city}}</view>
</view>
</block>
</view>
</view>
<view class="selection" wx:for="{{cityList}}" wx:key="{{item.initial}}">
<view class="item_letter" id="{{item.initial}}">{{item.initial}}</view>
<view class="item_city" wx:for="{{item.cityInfo}}" wx:for-item="ct" wx:key="{{ct.id}}" data-cityCode="{{ct.code}}" data-city="{{ct.city}}" bindtap="bindCity">
{{ct.city}}
</view>
</view>
</scroll-view>
\ No newline at end of file
.searchLetter {
position: fixed;
right: 0;
width: 50rpx;
text-align: center;
justify-content: center;
display: flex;
flex-direction: column;
color: #666;
z-index: 1;
}
.searchLetter view {
margin-top: 20rpx;
color: #999999 !important ;
}
.touchClass {
background-color: #fff;
color: #fff;
padding-top: 91rpx;
}
.showSlectedLetter {
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 50%;
left: 50%;
margin: -100rpx;
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
font-size: 52rpx;
z-index: 1;
}
.selection {
display: flex;
width: 100%;
flex-direction: column;
margin: 0rpx 0 0;
}
.item_letter {
display: flex;
background-color: #f5f5f5;
height: 40rpx;
padding-left: 34rpx;
align-items: center;
font-size: 24rpx;
color: #666;
}
.item_city {
display: flex;
background-color: #fff;
height: 100rpx;
padding-left: 34rpx;
align-items: center;
border-bottom: 1rpx solid #ededed;
font-size: 24rpx;
color: #666;
}
.hotcity-common {
font-size: 24rpx;
color: #666;
padding: 0 0 0 30rpx;
}
.thisCity {
padding-top: 100rpx;
}
.thisCityName {
display: inline-block;
border: 1rpx solid #f64f15;
border-radius: 8rpx;
padding: 10rpx 0;
font-size: 24rpx;
color: #f64f15;
text-align: center;
min-width: 149.5rpx;
margin: 20rpx 0 20rpx 30rpx;
}
.thishotText {
color: #999999;
font-size: 20rpx;
margin: 0 !important;
}
.slectCity {
border-color: #999999 !important;
}
.slectCity view {
color: #999999 !important;
}
.weui-grid {
position: relative;
float: left;
padding: 10rpx 0;
width: 149.5rpx;
box-sizing: border-box;
border: 1rpx solid #ececec;
border-radius: 8rpx;
margin: 10rpx 12rpx 20rpx;
}
.weui-grid__label {
display: block;
text-align: center;
color: #333;
font-size: 24rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.list-search {
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
width: 100%;
height: 90rpx;
padding: 10rpx 30rpx;
box-sizing: border-box;
z-index: 20;
background: #FFF;
border-bottom:1px #f5f5f5 solid;
}
.search-title {
flex-shrink: 0;
font-size: 28rpx;
padding-right: 10rpx;
}
.list-search-box {
display: flex;
align-items: center;
padding: 0 30rpx;
width: 100%;
height: 70rpx;
background: #f5f5f5;
border-radius: 90rpx;
font-size: 28rpx;
box-sizing: border-box;
}
.list-search-box input {
width: 100%;
padding-left: 10rpx;
}
.search-button {
/* width: 100rpx; */
flex-shrink: 0;
height: 60rpx;
line-height: 60rpx;
font-size: 28rpx;
margin-left: 10rpx;
}
button::after{
border: none;
padding: 0
}
/* 热门城市横排显示样式 */
.list-horizontal {
display: flex;
flex-wrap: wrap;
padding: 10rpx;
padding-right: 50rpx;
}
.list-horizontal .list-name {
padding: 5rpx 20rpx;
border: 1px #ccc solid;
border-radius: 10rpx;
margin: 10rpx;
/* margin-right: 20rpx; */
}
.fiexed-box {
position: absolute;
top: 90rpx;
z-index: 19;
width: 100%;
/* background: #ddd; */
}
\ No newline at end of file
const app = getApp();
import luma from '../../utils/luma.js';
import {
getMakingBargain,
getLaunchBargain,
} from '../../api/bargaining.js';
import {
getLuckDrawList,
getchecktimeLogistics,
cart_count,
} from '../../api/user.js';
import {
getAd
} from '../../api/api.js';
import {
dontReadCount
} from '../../api/advicesCenter.js';
var clientImgPath = app.globalData.clientImgPath;
var img_host = app.globalData.ImgPath;
import {cateGoodsList} from "../../api/mall.js";
import {getTaobaoInfos,getTransferChain} from "../../api/goods";
import { setsubscript} from "../../utils/setsubscript";
import { carryUser} from "../../api/shopping";
Page({
/**
* 页面的初始数据
*/
data: {
modeltype:1,
isshowcaigou:false,
statusBarHeight: 0,
cart_count: 0,//购物车数量
is_closed: 1,
showDialog: false, //弹出
host_img: app.globalData.ImgPath,
clientImgPath: clientImgPath,
drawList: 0, //查看大转盘有没有奖品可领取
hidden: false, //授权弹窗是否显示
userInfo: {info:{}}, //用户信息
Logisticslist: [],
youliList: [],
youliPage: 1,
threelist: [], //展示三条优选数据
//商城福利专区
fathertabactive: 1,
statusTab: 1,
scrleft: 0,
curid: 0,
tapsui_zTab: 0,
page: 1,
list: [],
is_loading_done: false,
cate_names: [],
key_word: '',
clientImgPath: clientImgPath,
isNotend: false,
selected: [],
showDialogtwo: false,
scrollTop: 0,
floorstatus: false,
img_host,
isloadingstate:false,//是否是在加载中 防止多次请求
getMaking:0,
getLaunch:0,
makers_hide:1,//合伙人 1隐藏 0显示
stock_hide:1,//股票股权 1隐藏 0显示
},
bargaining(){
if(this.data.getMaking==0&&this.data.getLaunch==0){
wx.showToast({
title: '暂时没有砍价商品,请耐心等待',
icon:'none'
})
}else{
wx.navigateTo({
url:'/pages/bargaining/bargaining'
})
}
},
getMakingBargainFun(){
getMakingBargain({}).then(res=>{
if(res.code==0){
this.setData({
getMaking:res.data.length
})
}
})
},
getLaunchBargainFun(){
getLaunchBargain({}).then(res=>{
if(res.code==0){
this.setData({
getLaunch:res.data.length
})
}
})
},
carryUser(){
carryUser({}).then(res=>{
if(res.code == 0){
if(res.data.shop_id == 0){
this.setData({
isshowcaigou:false,
purchase_id:res.data.purchase,
makers_hide:res.data.makers_hide,//合伙人 1隐藏 0显示
stock_hide:res.data.stock_hide,//股票股权 1隐藏 0显示
})
}else{
this.setData({
isshowcaigou:true,
purchase_id:res.data.purchase,
makers_hide:1,
stock_hide:1,
})
}
}
})
},
/*
点击扫一扫
*/
feature(e) {
luma.scanqrcode();
},
getLuckDrawListFun() { //查看大转盘有没有奖品可领取
getLuckDrawList({
order_status: 1, //1待领奖 2已领奖
page: 0,
}).then(res => {
if (res.code == 0) {
this.setData({
drawList: res.data.list.length
})
}
})
},
toDraw() { //跳转到抽奖
wx.navigateTo({
url: "/pages/rotary/rotary?type=2",
})
},
//跳转召唤好友
friends_share: function (e) {
var params = {};
wx.navigateTo({
url: '/pages/personal/friends_share/call_friends/call_friends',
})
},
my_huihua() {
wx.showModal({
title: '提示',
content: '小程序暂未开通会话',
showCancel: false,
success(res) {
if (res.confirm) {
// console.log('用户点击确定')
} else if (res.cancel) {
// console.log('用户点击取消')
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
statusBarHeight:wx.getSystemInfoSync().statusBarHeight,//状态栏高度
})
this.cateGoodsList();
wx.getSystemInfo({
success: (res) => {
this.setData({
windowWidth: res.windowWidth
})
},
})
},
// 跳转我的外卖订单列表
eleLine: function () {
wx.navigateTo({
url: '/pages/shop/order/eleorder/eleLine_list_user/eleLine_list_user',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
var that = this;
},
setUserInfo(e) { //点击了授权
if (e.detail) {
console.log('这里ß')
this.setData({
hidden: false,
userInfo: wx.getStorageSync('userInfo')
});
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
if(wx.getStorageSync('showkefu')){
wx.setStorageSync('showkefu', "");
this.setData({
modeltype:2,
showDialog:true,
})
}
if(wx.getStorageSync('showkefu1')){
wx.setStorageSync('showkefu1', "");
this.setData({
modeltype:1,
showDialog:true,
})
}
this.setData({
statusBarHeight: (wx.getSystemInfoSync()["statusBarHeight"]),
is_closed: app.globalData.is_closed
})
//读取广告
getAd({
'ad_id': 75
}).then(res => {
this.setData({
ad_list: res.data.ad_list
})
});
// 检测是否登录授权
if (wx.getStorageSync('userInfo')) { //授权了
this.getLaunchBargainFun(); //未砍列表
this.getMakingBargainFun();//已砍列表
this.carryUser(); //判断用户是不是商家
getchecktimeLogistics({}).then(res => {
if (res.code == 0) {
this.setData({
Logisticslist: res.data.list
})
}
})
//等同 getUserInfo
setsubscript({}).then(cont => { //获取用户信息
wx.setStorageSync('userInfo', cont.data);
wx.setStorageSync('user_id', cont.data.info.user_id);
this.setData({
hidden: false,
userInfo: cont.data
});
}).catch(err => {
if (err.code == '-99999' || err.code == '-10800') {
this.setData({
hidden: true
});
}
})
} else { //没有授权
this.setData({
hidden: true
});
}
this.getcart_count();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
this.setData({ hidden: false });
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if(this.data.isloadingstate){
console.info("加载太快了~");
return false;
}
var that = this
var is_loading_done = that.data.is_loading_done; //是否加载完毕
if (this.data.fathertabactive == 2) {
is_loading_done = this.data.isNotend;
}
if (is_loading_done == false) { //还没加载完毕则继续加载
wx.showLoading({
title: '加载中',
mask: false
})
let page = that.data.page
that.setData({
page: page + 1
})
this.setData({
isloadingstate:true,
})
if (this.data.fathertabactive == 1) {
this.cateGoodsList()
} else if (this.data.fathertabactive == 2) {
this.getTaobaoInfosFun()
}
} else {
wx.showLoading({
title: '已全部加载完毕',
mask: false
})
setTimeout(function () {
wx.hideLoading()
}, 1000)
}
},
/**
* 页面跳转
*/
toggleDialog() {
this.setData({
showDialog: !this.data.showDialog
});
},
band(e) {
this.setData({
modeltype:e.currentTarget.dataset.type,
})
this.toggleDialog()
},
goPages(e) {
if (app.globalData.isLog) {
} else {
this.setData({
iShidden: false
});
}
},
/*
一键回到顶部
*/
goTop() {
if (wx.pageScrollTo) {
wx.pageScrollTo({
scrollTop: 0
})
} else {
wx.showModal({
title: '提示',
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
})
}
},
onPageScroll({
scrollTop
}) { // 获取滚动条当前位置
// console.info(scrollTop,"scrollTop");
this.setData({
scrollTop: scrollTop
})
if (scrollTop > 200) { //处理返回顶部
this.setData({
floorstatus: true
});
} else {
this.setData({
floorstatus: false
});
}
},
handleTouchStart(e) {
this.startTime = e.timeStamp;
},
handleTouchEnd(e) {
this.endTime = e.timeStamp;
///console.log(" endTime = " + e.timeStamp);  
},
handleLongPress(e) {
var that = this;
this.dontReadCount();
},
dontReadCount() {
var that = this;
let param = {}
dontReadCount(param).then(res => {
console.log(res);
console.log(res.data);
console.log(res.data.data);
if (res.data > 0) {
wx.vibrateShort();
wx.showModal({
content: "是否要将所有消息标记为已读?",
showCancel: true,
success(res) {
if (res.confirm) {
that.letAdvicesIsRead();
} else {
return false;
}
}
})
} else {
return false;
}
});
},
letAdvicesIsRead() {
var that = this;
let param = {}
},
jumpAdvices(e) {
wx.switchTab({
url: '/pages/advicesmsg/advicesmsg',
})
},
//获取购物车数量
getcart_count() {
cart_count({
}).then((res) => {
if (res.code == 0) {
this.setData({
cart_count: res.data.cart_count,
})
}
})
},
//商城福利板块
taggletabs(e) {
if (this.data.curid == e.currentTarget.dataset.id) {
return false;
} else {
this.setData({
curid: e.currentTarget.dataset.id,
page: 1,
key_word: '',
})
this.cateGoodsList()
let current = e.currentTarget.dataset.current;
//每个tab选项宽度占1/5
var singleNavWidth = this.data.windowWidth / 5;
//tab选项居中
this.setData({
scrleft: (current - 2) * singleNavWidth
})
}
},
tagglemalltab(e) {
let index = e.currentTarget.dataset.index;
this.setData({
fathertabactive: index,
})
if (index == 1) {
this.setData({
page: 1,
list: [],
is_loading_done: false,
isloadingstate:true,
})
this.cateGoodsList();
} else if (index == 2) {
this.setData({
page: 1,
selected: [],
isNotend: false,
isloadingstate:true,
})
this.getTaobaoInfosFun()
}
},
//获取商品列表
//获取分享赚钱
cateGoodsList() {
var that = this
wx.showLoading()
cateGoodsList({ cate_id: that.data.curid, page: that.data.page, key_word: "" }).then(res => {
this.data.isloadingstate = false;
if (res.code == 0) {
if (that.data.page == 1) {
that.setData({
list: res.data.list,
cate_names: res.data.cate_names
})
console.log(res.data)
} else {
that.setData({
list: that.data.list.concat(res.data.list),
cate_names: res.data.cate_names
})
}
if (res.data.list && res.data.list.length < 10) {
that.setData({
is_loading_done: true,
})
} else {
that.setData({
is_loading_done: false,
})
}
wx.hideLoading()
} else {
wx.hideLoading()
}
})
},
//获取自购省钱 淘宝客商品
getTaobaoInfosFun() {
wx.showLoading({
title: '加载中',
mask: false
})
getTaobaoInfos({
page: this.data.page,
keyword: ""
}).then(res => {
this.data.isloadingstate = false;
wx.hideLoading()
if (res.code == 0) {
if (res.data.length < 9) {
this.setData({
isNotend: false
})
} else {
this.setData({
isNotend: true
})
}
if (res.data) {
this.setData({
selected: [...this.data.selected, ...res.data]
})
}
}
})
},
close() {
this.setData({
showDialogtwo: !this.data.showDialogtwo
})
},
toggleDialogtwo(e) {
let id = e.currentTarget.dataset.id;
let goodsid = e.currentTarget.dataset.goodsid
console.log(id, goodsid, "??")
this.getTransferChainFun(id, goodsid)
this.setData({
title: e.currentTarget.dataset.title,
photo: e.currentTarget.dataset.photo,
});
},
// 淘宝链接
getTransferChainFun(id, goodsid) {
getTransferChain({
taobao_id: id,
goods_id: goodsid
}).then(res => {
if (res.code == 0) {
if (res.data) {
console.info(res, '豆豆狗')
this.setData({
command: res.data.long_model,
openUrl: res.data.coupon_click_url,
showDialogtwo: !this.data.showDialogtwo
})
// this.$refs.popup.open()
}
} else {
wx.showToast({
title: '该商品暂时无法分享',
duration: 2000,
icon: 'none'
});
}
})
},
// 复制 复制淘口令
copy() {
wx.setClipboardData({
data: this.data.command,
success(res) {
wx.getClipboardData({
success(res) {
console.log(res.data) // data
}
})
}
});
},
//采购
purchase(){
wx.navigateTo({
url: '/pages/shop/shops/ele/ele?&shop_id='+this.data.purchase_id,
})
},
onShareAppMessage: function () {
let userInfo = wx.getStorageSync('userInfo');
let user_id = "";
let title = ``;
if(userInfo.info){
user_id = userInfo.info.user_id;
title = `${userInfo.info.nickname}喊你: 成为鹿马合伙人,跟着我轻松让你月入过万。`
}else{
title = '成为鹿马合伙人,跟着我轻松月入过万。';
}
return {
title: title,
path:"/pages/index/index?shareuid="+user_id,
imageUrl: this.data.clientImgPath+'/images/sharethumbnail.jpg?1='+Math.random()
}
},
/**
* 分享朋友圈
*/
onShareTimeline() {
let userInfo = wx.getStorageSync('userInfo');
let title = ``;
let user_id = "";
if(userInfo.info){
title = `${userInfo.info.nickname}喊你: 成为鹿马合伙人,跟着我轻松让你月入过万。`
user_id = userInfo.info.user_id
}else{
title = '成为鹿马合伙人,跟着我轻松月入过万。';
}
return {
title: title,
query:"shareuid="+user_id,
imageUrl:this.data.clientImgPath+'/images/sharethumbnail.jpg?1='+Math.random()
}
},
});
\ No newline at end of file
{
"usingComponents": {
"empty":"/@vant/weapp/lib/empty/index"
},
"navigationStyle": "custom",
"navigationBarTitleText": "我的"
}
\ No newline at end of file
<!-- 背景图 -->
<view class="usbjimg">
<image src="{{clientImgPath}}/images/percenter/bgpic.png"></image>
</view>
<view class="boxs">
<view style="width:100%;height:{{statusBarHeight+25}}px"></view>
<view class="ali-c">
<view class="touxbox" bindtap='goPages'>
<view class="touximg">
<image src='{{userInfo.info.face}}'></image>
</view>
</view>
<view class="ml-30 wh_f1">
<view class="ali-z">
<view class="c_bi sz_40 oneline_400 mb-20" bindtap='goPages'>{{userInfo.info.nickname || '请授权'}}</view>
<view class=" ali-c">
<navigator url="/pages/personal/set/set">
<view class="ali-c">
<view class="yingyongimg" catchtap="feature">
<image src='{{clientImgPath}}/images/images/sys.png'></image>
</view>
<!-- <view class="c_bi sz_28 ml-20">收款码</view> /pages/personal/payment_code/payment_code-->
</view>
</navigator>
<view bindtap="jumpAdvices" bindtouchstart="handleTouchStart" bindtouchend="handleTouchEnd"
bindlongpress="handleLongPress">
<view class="yingyongimg ml-50 po_r">
<image src='{{clientImgPath}}/images/percenter/xiaoxi@2x.png'></image>
<view class="po_a gel_shu" wx:if="{{userInfo.advicesCount > 0}}">
{{ userInfo.advicesCount <= 99?userInfo.advicesCount:99 }}
</view>
</view>
</view>
</view>
</view>
<view class="idbtn">ID账号: {{ userInfo.info.user_id }}</view>
</view>
</view>
<!-- 关注 -->
<view class="ali-z jus-c mt-50">
<navigator url="/pages/personal/my_focus/my_focus">
<view class="c_bi sz_28 te_ct">
<view class="mb-10">{{userInfo.shopCount}}</view>
<view class="let_5">店铺关注</view>
</view>
</navigator>
<navigator url="/pages/personal/browse/browse">
<view class="c_bi sz_28 te_ct">
<view class="mb-10">{{userInfo.goodsCount}}</view>
<view class="let_5">浏览记录</view>
</view>
</navigator>
<!-- <navigator url="/pages/personal/coupons/coupons">
<view class="c_bi sz_28 te_ct">
<view class="mb-10">{{userInfo.couponCount}}</view>
<view class="let_5">红包卡券</view>
</view>
</navigator> -->
<navigator url="/pages/shopping_cart/shopping_cart">
<view class="c_bi sz_28 te_ct">
<view class="mb-10">{{cart_count}}</view>
<!-- {{userInfo.couponCount}} -->
<view class="let_5">购物车</view>
</view>
</navigator>
<navigator url="/pages/community/community" wx:if="{{is_closed == 2}}">
<view class="c_bi sz_28 te_ct">
<view class="mb-10">{{userInfo.news_comment_count}}</view>
<view class="let_5">我的圈子</view>
</view>
</navigator>
<!-- <view class="c_bi sz_28 te_ct">
<view class="mb-10">{{member.integral}}</view>
<view class="let_5">我的余额</view>
</view> -->
</view>
<!-- 充值 -->
<view class="chongzbox flex mt-30" style="background-image:url('{{clientImgPath}}/images/percenter/pcbg.png')">
<view class="te_ct yuebox" style="border-right: 1px solid rgba(210,210,210,1)">
<view class="c_ff sz_40 dj-b jus-c" style="line-height: 40rpx;">{{userInfo.info.money}}
<text class="min_text"></text>
</view>
<navigator url="/pages/personal/topUp/topUp" hover-class="none">
<view class="bt_min mt-20">我的余额
<text class="c_ff ml-40">充值</text>
</view>
</navigator>
</view>
<view class="te_ct yuebox" bindtap="band" data-type="1">
<view class="c_ff sz_40 dj-b jus-c" style="line-height: 40rpx;">{{userInfo.info.commission}}
</view>
<view class="bt_min mt-20">我的佣金
<text class="c_ff ml-40">提现</text>
</view>
</view>
</view>
<!-- 商城订单 -->
<view class="minbox_24 br_15 mt-20">
<navigator class="ali-z mb-25" url="/pages/shop/order/weidianorder/weidianLine_list_user/weidianLine_list_user"
hover-class="none">
<view class="bt_min">我的订单</view>
<view class="ali-c">
<!-- <view class="xi_hui sz_26">商城订单/外卖订单/买菜订单</view> -->
<view class="xi_hui sz_26">商城订单/外卖订单</view>
<view class="xiangyouimg ml-20">
<image src='{{clientImgPath}}/images/uts/quanbu@2x.png'></image>
</view>
</view>
</navigator>
<view class="xian"></view>
<view class="ali-z mt-50">
<navigator
url="/pages/shop/order/weidianorder/weidianLine_list_user/weidianLine_list_user?current=0&status=0&currentTab=1"
class="c_bi sz_28 te_ct" hover-class="none">
<view class="dukuanimg po_r juzhong">
<image src='{{clientImgPath}}/images/uts/fukuan.png'></image>
<view class="dukuanshu" wx:if="{{userInfo.unpaid > 0}}">{{userInfo.unpaid}}</view>
</view>
<view class="let_5 sz_26 bt_hei mt-15">待付款</view>
</navigator>
<navigator
url="/pages/shop/order/weidianorder/weidianLine_list_user/weidianLine_list_user?current=1&status=1,2&currentTab=2"
class="c_bi sz_28 te_ct" hover-class="none">
<view class="dukuanimg po_r juzhong">
<image src='{{clientImgPath}}/images/uts/iocnnew.png'></image>
<view class="dukuanshu" wx:if="{{userInfo.unshipments > 0}}">{{userInfo.unshipments}}</view>
</view>
<view class="let_5 sz_26 bt_hei mt-15">待发货</view>
</navigator>
<navigator
url="/pages/shop/order/weidianorder/weidianLine_list_user/weidianLine_list_user?current=3&status=3&currentTab=3"
class="c_bi sz_28 te_ct" hover-class="none">
<view class="dukuanimg po_r juzhong">
<image src='{{clientImgPath}}/images/uts/iconskd.png'></image>
<view class="dukuanshu" wx:if="{{userInfo.unreceiving > 0}}">{{userInfo.unreceiving}}</view>
</view>
<view class="let_5 sz_26 bt_hei mt-15">待收货</view>
</navigator>
<navigator
url="/pages/shop/order/weidianorder/weidianLine_list_user/weidianLine_list_user?current=8&status=8&is_dianping=0&currentTab=4"
class="c_bi sz_28 te_ct" hover-class="none">
<view class="dukuanimg po_r juzhong">
<image src='{{clientImgPath}}/images/uts/icons676.png'></image>
<view class="dukuanshu" wx:if="{{userInfo.undianping > 0}}">{{userInfo.undianping}}</view>
</view>
<view class="let_5 sz_26 bt_hei mt-15">待评价</view>
</navigator>
<navigator
url="/pages/shop/order/weidianorder/weidianLine_list_user/weidianLine_list_user?current=4&status=4,5,6,7&is_dianping=0&currentTab=6"
class="c_bi sz_28 te_ct" hover-class="none">
<view class="dukuanimg po_r juzhong">
<image src='{{clientImgPath}}/images/uts/priceicon.png'></image>
<view class="dukuanshu" wx:if="{{userInfo.unsale > 0}}">{{userInfo.unsale}}</view>
</view>
<view class="let_5 sz_26 bt_hei mt-15">退款售后</view>
</navigator>
</view>
<swiper wx:if="{{Logisticslist.length != 0}}" circular="{{true}}" indicator-dots="{{false}}" autoplay="{{true}}"
vertical="{{true}}" interval="3000" duration="1000" style="height: 110rpx;margin-top: 15rpx;">
<swiper-item wx:for="{{Logisticslist}}" wx:key="index" wx:for-item="item">
<navigator
url="/pages/shop/order/weidianorder/check_logistics/check_logistics?action=checkLogistics&order_id={{item.order_id}}"
open-type="navigate" class="logisticsbox flex">
<view class="newmessage">
最新物流
</view>
<view class="logisticsimg">
<image src="https://luma.jxdsy.cn/attachs/{{item.photo}}" mode="" style="display: inline;"></image>
</view>
<view class="" style="width: 70%; color: #969696;font-size:28rpx;">
<view class="oneline" style="text-align: justify;text-justify: inter-ideograph;">
<view>【{{item.AcceptTime}}】</view>
<view>{{item.AcceptStation}}</view>
</view>
<!-- <view class="oneline" style="text-align: justify;text-justify: inter-ideograph;">
</view> -->
</view>
</navigator>
</swiper-item>
</swiper>
</view>
<!-- 签到领鸡蛋 -->
<!-- <block wx:if="{{userInfo.sign_status==1}}">
<navigator hover-class="none" url="/pages/user/signIn/signIn">
<view class="hehuoimg mt-20">
<image src="https://luma.jxdsy.cn/static/applet5/images/sign/enterSign.png"></image>
</view>
</navigator>
</block> -->
<!-- 抽签 好运签 -->
<!-- <block>
<navigator hover-class="none" url="/pages/testluck/testluck">
<view class="hehuoimg mt-20">
<image src="{{clientImgPath}}/images/testluck/signbanner.png"></image>
</view>
</navigator>
</block> -->
<!-- 鹿马拼入口 -->
<!-- wx:if="{{false}}" -->
<view class="minbox_24 br_15 mt-20 lmpingrukou">
<navigator class="ali-z mb-25" url="/pages/lmping/user/user"
hover-class="none">
<view class="bt_min">我的拼团</view>
<view class="ali-c">
<view class="xi_hui sz_26">拼团中心</view>
<view class="xiangyouimg ml-20">
<image src='{{clientImgPath}}/images/uts/quanbu@2x.png'></image>
</view>
</view>
</navigator>
<view class="xian"></view>
<view class="pingnavs flex jus-a">
<navigator url="/pages/lmping/order/order?tab=0" class="pingnavitem">
<image class="rukouimg" src="{{clientImgPath}}/images/lmping/pingimg.png" mode=""></image>
<view class="rukoutit">正在拼团</view>
</navigator>
<navigator url="/pages/lmping/order/order?tab=2" class="pingnavitem">
<image class="rukouimg" src="{{clientImgPath}}/images/lmping/tuanimg.png" mode=""></image>
<view class="rukoutit">拼团成功</view>
</navigator>
</view>
</view>
<!-- 鹿马拼入口 -->
<!-- <block>
<navigator hover-class="none" url="/pages/partner_zone/partner_zone">
<view class="hehuoimg mt-20">
<image src="{{host_img}}/attachs/2021/01/14/60001a193b0dd.jpg"></image>
</view>
</navigator>
</block> -->
<!-- 关注公众号 -->
<navigator hover-class="none" url="/pages/webview/webview?url=https://mp.weixin.qq.com/s/MLcxgrfqh-RCL190j3xh4g"
class="partnerboxcss followbox flex ali-c jus-b"
style="background-image:url('{{clientImgPath}}/images/percenter/followbgs.png')">
<view class="lefttxts">
<view class="soves">关注公众号</view>
<view class="twolines">第一时间获取鹿马最新动态</view>
</view>
<view class="sovesbtn flex ali-c jus-c"><text>+</text>关注</view>
</navigator>
<!-- 合伙人专区 招募合伙人 奖励高、结算快、门槛低 立即加入-->
<!-- <navigator hover-class="none" url="/pages/partner_zone/partner_zone" class="partnerboxcss">
<view class="flex ali-c" style="height: 160rpx;">
<view style="margin-left: 30%;">
<view class="partnertitlecss">招募合伙人</view>
<view style="color:#999999;font-size:28rpx">奖励高、结算快、门槛低</view>
</view>
<view style="margin-left:60rpx">
<view style="font-size:34rpx" >立即</view>
<view style="font-size:34rpx" >加入</view>
</view>
<view class="partnerjiantoucss">
<image src="https://luma.jxdsy.cn/static/applet5/images/partner_zone/jiantou.png"></image>
</view>
</view>
</navigator> -->
<view style="display:flex;justify-content:space-between;">
<navigator hover-class="none" url="/pages/personal/transfer/transfer" style="width:49%">
<view class="hehuoimg mt-20 remyfriends" style="">
<view style="position: relative;top: 20%;left: 20rpx;">
<view style="color: #000000;font-size: 32rpx;font-weight: bold;margin: 0 0 10rpx 0;">转帐好友</view>
<view style="color: #999999;font-size: 24rpx;margin: 10rpx 0 0 0;">嘘寒问暖不如转笔巨款</view>
</view>
</view>
</navigator>
<navigator hover-class="none" url="/pages/personal/I_bill/I_bill" style="width:49%">
<view class="hehuoimg mt-20 mybills">
<view style="position: relative;top: 20%;left: 20rpx;">
<view style="color: #000000;font-size: 32rpx;font-weight: bold;margin: 0 0 10rpx 0;">我的账单</view>
<view style="color: #999999;font-size: 24rpx;margin: 10rpx 0 0 0;">每天收入/支出看得见</view>
</view>
</view>
</navigator>
</view>
<!-- 优选数据 -->
<!-- <view style="display:flex;justify-content:space-between;margin-top:20rpx;">
<view url="/pages/optimization/optimization" open-type="switchTab" class="userpagebanner" style="width:100%;height:250rpx;background-image: url({{clientImgPath}}/images/percenter/titlebg.png); background-size:100% 100%;background-repeat: no-repeat;">
<navigator url="/pages/Mallwelfare/Mallwelfare" hover-class="none" class="flex" style="justify-content: space-between;padding: 20rpx;">
<view class="" style="height: 30rpx;">
<view style="color:#f64f15;font-size:34rpx;font-weight:bold;"><text>分享赚钱</text> <text style="margin-left:20rpx;">自购省钱</text></view>
</view>
<view class="" style="height: 40rpx;">
<view style="font-size:28rpx;color:#f64f15;">超嗨超便宜</view>
</view>
</navigator>
<swiper indicator-dots="{{false}}" autoplay="{{false}}" interval="3000" disable-touch="{{true}}" duration="1000" vertical="{{true}}" style="height: 160rpx;">
<swiper-item>
<view class="flex" style="color:rgba(246, 79, 21, 1);justify-content: space-around;">
<navigator url="/pages/shop/shops/weidian/weidian_details/weidian_details?goods_id={{item.id}}" style="width: 30%;" wx:for="{{threelist}}" wx:key="index" wx:for-item="item" wx:if="{{index<3}}">
<view class="" style="height: 120rpx;">
<image class="linegoodsimg" src="https://luma.jxdsy.cn/attachs/{{item.img}}" mode="aspectFill" style=""></image>
</view>
<view class="" style="text-align: center;">
<text style="font-size: 12px;">抢购价¥</text><text>{{item.price}}</text>
</view>
</navigator>
</view>
</swiper-item>
</swiper>
</view>
</view> -->
<!-- 我的服务 -->
<view class="minbox_24 br_15 mt-20">
<view class="bt_min mb-25">服务频道</view>
<view class="xian"></view>
<!-- mt-50 -->
<view class="ali-c ds-fw mb-30 ">
<view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/personal/evaluate_list/evaluate_list" hover-class="none">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/percenter/icons6794.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">我的评价</view>
</navigator>
</view>
<view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/personal/Icooperation/Icooperation" hover-class="none">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/percenter/icons6805.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">我要合作</view>
</navigator>
</view>
<view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/personal/coupons/coupons" hover-class="none">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/percenter/icons6800.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">我的卡券</view>
</navigator>
</view>
<view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/lmping/user/user" hover-class="none">
<view class="tubiaoimg juzhong">
<view style="position:absolute;width: 54rpx;height: 32rpx;right: 30rpx;top: -16rpx;">
<image src="{{clientImgPath}}/images/percenter/hot.png"></image>
</view>
<image style="border-radius:50%;" src='{{clientImgPath}}/images/lmping/pingimg.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">拼团中心</view>
</navigator>
</view>
<view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/personal/Ishop/Ishop" hover-class="none">
<view class="tubiaoimg juzhong">
<view style="position:absolute;width: 54rpx;height: 32rpx;right: 30rpx;top: -16rpx;">
<image src="{{clientImgPath}}/images/percenter/hot.png"></image>
</view>
<image src='{{clientImgPath}}/images/percenter/icons6801.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">我的店铺</view>
</navigator>
</view>
<view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/user/answer/answer" hover-class="none">
<view style="position:absolute;width: 54rpx;height: 32rpx;right: 30rpx;top: -16rpx;z-index:10;">
<image src="{{clientImgPath}}/images/percenter/hot.png"></image>
</view>
<view class="tubiaoimg juzhong po_r">
<image src='{{clientImgPath}}/images/percenter/answerQuestion.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">疑问解答</view>
</navigator>
</view>
<view class="c_bi sz_28 te_ct tubiaobox mt-50" bindtap="friends_share">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/percenter/icons6802.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">锁客好友</view>
</view>
<view class="c_bi sz_28 te_ct tubiaobox mt-50">
<view style="position:absolute;width: 54rpx;height: 32rpx;right: 30rpx;top: -16rpx;">
<image src="{{clientImgPath}}/images/percenter/hot.png"></image>
</view>
<navigator url="/pages/personal/agent_center/agent_center" hover-class="none">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/percenter/icons6799.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">代理商中心</view>
</navigator>
</view>
<view wx:if="{{makers_hide==0}}" class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/personal/partner/partner" hover-class="none">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/percenter/icons6798.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">合伙人中心</view>
</navigator>
</view>
<!-- <view class="c_bi sz_28 te_ct tubiaobox mt-50" bindtap="eleLine">
<view class="tubiaoimg_a juzhong po_r">
<image src='{{clientImgPath}}/images/uts/checheicon.png'></image>
<view class="po_a gel_shu" wx:if="{{personal.elesum>0}}">{{personal.elesum}}</view>
</view>
<view class="sz_26 bt_hei mt-15">外卖订单</view>
</view> -->
<view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/personal/set/set" hover-class="none">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/percenter/icons6803.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">设置管理</view>
</navigator>
</view>
<!-- <view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/personal/transfer/transfer" hover-class="none">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/uts/icons6795.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">鹿马转账</view>
</navigator>
</view> -->
<view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/personal/synopsisLuma/synopsisLuma" hover-class="none">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/percenter/icons6804.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">关于鹿马</view>
</navigator>
</view>
<!-- <view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/activityDetail/zeroactivity/zeroactivity" hover-class="none">
<view style="position:absolute;width: 54rpx;height: 32rpx;right: 30rpx;top: -16rpx;z-index:10;">
<image src="{{clientImgPath}}/images/percenter/hot.png"></image>
</view>
<view class="tubiaoimg juzhong po_r">
<image src='https://luma.jxdsy.cn/static/applet5/images/zeroActivity/zero.gif'></image>
</view>
<view class="sz_26 bt_hei mt-15">0元领</view>
</navigator>
</view> -->
<!-- <view class="c_bi sz_28 te_ct tubiaobox mt-50">
<view catchtap="bargaining">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/percenter/bargaining.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">鹿马砍价</view>
</view>
</view> -->
<view class="c_bi sz_28 te_ct tubiaobox mt-50" wx:if="{{isshowcaigou}}">
<view catchtap="purchase">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/images/purchase.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">采购</view>
</view>
</view>
<view wx:if="{{ (userInfo.info.lmgupiao || userInfo.info.lmgu) && stock_hide==0 }}" class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator hover-class="none" url="/pages/personal/stock_rights/stock_rights">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/percenter/thighicon.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">股权/股票</view>
</navigator>
</view>
<view class="c_bi sz_28 te_ct tubiaobox mt-50 " >
<view bindtap="band" data-type="2">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/percenter/gasstation.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">鹿马加油</view>
</view>
</view>
<!-- <view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/LuckDraw/homenav/homenav?userpage=1" hover-class="none">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/luckdraw/luckicons.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">抽奖活动</view>
</navigator>
</view> -->
<!-- <view class="c_bi sz_28 te_ct tubiaobox mt-50">
<navigator url="/pages/personal/payment_code/payment_code" hover-class="none">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/luckdraw/luckicons.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">收款码</view>
</navigator>
</view> -->
<view class="c_bi sz_28 te_ct tubiaobox mt-50" wx:if='{{drawList!=0}}' bindtap="toDraw">
<view class="tubiaoimg juzhong">
<image src='{{clientImgPath}}/images/luckdraw/zhuznpan.png'></image>
</view>
<view class="sz_26 bt_hei mt-15">大转盘奖品</view>
</view>
</view>
</view>
</view>
<!-- 福利商城板块 -->
<view class="Mallwelfare {{scrollTop>910?'on':''}}">
<view class="fulishowhead {{scrollTop>910?'on':''}} on1">
<view class="bannerimg">
<image class="img" src="{{clientImgPath}}/images/Mallwelfare/Mallwelfarebanner1.png?a=1" mode=""></image>
</view>
<!-- banner end -->
<!-- <view class="malltab flex ali-c">
<view class="malltabitem ali-c jus-c {{fathertabactive==1?'active1':''}}" bindtap="tagglemalltab" data-index="1">
分享赚钱
</view>
<view class="malltabitem ali-c jus-c {{fathertabactive==2?'active2':''}}" bindtap="tagglemalltab" data-index="2">
自购省钱
</view>
</view> -->
<!-- 2021年3月10日09:47:04 取消淘宝客板块 暂时隐藏 -->
<view class="" wx:if="{{fathertabactive==1}}">
<view class="categorytab flex ali-c flextoptwo">
<scroll-view class="flex ali-c" scroll-x="{{true}}" style="width: 100vw;" scroll-left="{{scrleft}}"
scroll-with-animation="{{true}}">
<view class="flex ali-c">
<view class="tabsitem flex ali-c flex1" catchtap="taggletabs" data-item="{{item}}"
data-id="{{item.cate_id}}" data-current="{{index+1}}" wx:for="{{cate_names}}" wx:key="index">
<view class="title {{curid==item.cate_id?'actives':''}}">{{item.name}}</view>
</view>
</view>
</scroll-view>
</view>
</view>
<!-- categorytab end -->
</view>
<!-- tab end -->
<!-- 商品列表 -->
<view wx:if="{{fathertabactive==1}}" class="mallgoodslist flex flex-wrap jus-b">
<navigator
url="/pages/shop/shops/weidian/weidian_details/weidian_details?goods_id={{item.id}}&cate_id={{item.cate_id}}"
class="goodsfareitem" wx:for="{{list}}" wx:key="index">
<image class="img" src="{{img_host}}/attachs/{{item.img}}" mode=""></image>
<view class="goodsfareitem_body">
<view class="faretit twoline">{{item.title}}</view>
<view class="f_sales">已有{{item.sold_num}}人购买</view>
<view class="fare_foot flex-wrap flex ali-c jus-b">
<view class="pricebox flex1">
<text class="Symbol">¥</text>
<text class="numbers">{{item.disprice}}</text>
</view>
<view class="comcard flex ali-c jus-c ml-10" wx:if="{{item.commission!=0}}">
分享赚<text>{{item.commission}}</text>元</view>
<view class="comcard flex ali-c jus-c ml-10" wx:else>分享好友</view>
</view>
</view>
</navigator>
<view class="emptybox">
<empty wx:if="{{list.length==0}}"></empty>
</view>
</view>
<view wx:if="{{fathertabactive==2}}" class="mallgoodslist flex flex-wrap jus-b">
<view bindtap="toggleDialogtwo" data-title="{{item.title}}" data-photo="{{item.photo}}" data-id="{{item.taobao_id}}"
data-goodsid="{{item.goods_id}}" class="goodsfareitem" wx:for="{{selected}}" wx:key="index">
<image class="img" src="{{img_host}}/attachs/{{item.photo}}" mode=""></image>
<view class="goodsfareitem_body">
<view class="faretit twoline">{{item.title}}</view>
<view class="f_sales">已有{{item.sold_num}}人购买</view>
<view class="fare_foot flex-wrap flex ali-c jus-b">
<view class="pricebox flex1">
<text class="Symbol">¥</text>
<text class="numbers">{{item.price}}</text>
</view>
<view class="comcard flex ali-c jus-c ml-10" wx:if="{{fathertabactive==1}}">
分享赚<text>{{item.commission}}</text>元</view>
<view class="comcard flex ali-c jus-c comcard1 ml-10" wx:if="{{fathertabactive==2}}">点击领券</view>
</view>
</view>
</view>
<view class="emptybox">
<empty wx:if="{{selected.length==0}}"></empty>
</view>
</view>
<!-- 淘宝口令弹窗 -->
<view class="zan-dialog {{ showDialogtwo ? 'zan-dialog--show' : '' }}">
<!-- 如果想点击弹窗外不隐藏,取消bindtap点击事件即可 -->
<view class="zan-dialog__mask" bindtap="close" />
<view class="zan-dialog__container1">
<view class="popupbox ali-c">
<view class="popupimg mb-20">
<view class="po_r" style="width: 100%;height: 880rpx;" bindtap="copy">
<image class="po_a" style="top: 0;left: 0;z-index: 0;" src="{{clientImgPath}}/images/taobao/popupimg.gif"
mode="widthFix"></image>
<view class="flex1 jus-c ali-c" style="padding-top: 200rpx;box-sizing: border-box;">
<image class="popspimg" src="{{img_host}}/attachs/{{photo}}" mode=""></image>
<view class="poptext ml-20 Threeline">
{{title}}
</view>
</view>
<view class="jus-c flex1 mt-25">
<view class="taobaokl ">
<text class="siline">{{command}}</text>
</view>
</view>
</view>
<view style="width: 100%;" class="jus-c" bindtap="close">
<image class="guanbi" src="{{clientImgPath}}/images/images/colse.png" mode=""></image>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 福利商城板块 -->
<!-- 登陆授权弹窗 -->
<login hidden="{{hidden}}" bind:setUserInfo="setUserInfo" />
<!-- 顶部固定 -->
<view class="topbais po_f ali-c jus-c cf" wx:if='{{scrollTop>40}}'
style="top:0;width:100%;padding-top:{{statusBarHeight}}px">
个人中心
</view>
<!-- 弹窗 -->
<view class="zan-dialog {{ showDialog ? 'zan-dialog--show' : '' }}">
<!-- 如果想点击弹窗外不隐藏,取消bindtap点击事件即可 -->
<view class="zan-dialog__mask" bindtap="toggleDialog" />
<view class="zan-dialog__container">
<view class="tanchuang1">
<view class="biaotiz">温馨提示</view>
<view class="mt-30 biaotizi">
<text wx:if="{{modeltype==1}}">请您前往鹿马APP进行申请提现,进入请回复</text>
<text wx:if="{{modeltype==2}}">请您前往鹿马APP享受优惠加油,进入请回复</text>
<text style="color:#f64f15;">'1'</text>
<text> 下载APP</text>
</view>
<view class="flex1 ali-c mt-40">
<button class="btnzbc c33" style="border-radius: 0;border-top:1px #e7e5e5 solid" bindtap="toggleDialog"
wx:if="{{modeltype==1}}">暂不提现</button>
<button class="btnzbc c33" style="border-radius: 0;border-top:1px #e7e5e5 solid" bindtap="toggleDialog"
wx:if="{{modeltype==2}}">再逛逛</button>
<button style="border-radius: 0;border-top:1px solid #e7e5e5;border-left:1px solid #e7e5e5;color:#f64f15;"
class="btnzbc" open-type="contact" bindcontact="handleContact">
<!-- 前往APP提现 -->
前往回复'1'
</button>
</view>
</view>
</view>
</view>
<!--返回顶部 -->
<image src='{{clientImgPath}}/images/uts/fanhuidb.png' class='goTop' hidden='{{!floorstatus}}' bindtap="goTop"></image>
\ No newline at end of file
page {
position: relative;
background: rgba(245, 242, 242, 1);
padding-bottom: 20rpx !important;
}
.usbjimg {
position: absolute;
top: 0;
left: 0;
range: 0;
width: 100%;
height: 480rpx;
z-index: -1;
/* background:linear-gradient(180deg,#FF5A02,rgba(255,16,16,0.92)); */
}
.partnerboxcss {
background-image: url(https://luma.jxdsy.cn/static/applet5/images/partner_zone/enterimage.png);
background-repeat: no-repeat;
margin-top: 20rpx;
height: 160rpx;
background-size: 100% 100%;
}
.partnerjiantoucss {
width: 16rpx;
height: 28rpx;
margin-left: 24rpx
}
.partnertitlecss {
font-size: 34rpx;
font-weight: bold;
margin-bottom: 10rpx;
}
.remyfriends {
background-image: url(https://luma.jxdsy.cn/static/applet5/images/percenter/myfriend.png);
background-size: 100% 100%;
}
.mybills {
background-image: url(https://luma.jxdsy.cn/static/applet5/images/percenter/mybill.png);
background-size: 100% 100%;
}
/* top */
.touxbox {
position: relative;
width: 115rpx;
height: 115rpx;
}
.zsimg {
position: absolute;
top: -62rpx;
width: 210rpx;
height: 150rpx;
left: -30rpx;
}
.touximg {
width: 115rpx;
height: 115rpx;
border-radius: 50%;
border: 2px solid #fff;
overflow: hidden;
}
.yingyongimg {
width: 42rpx;
height: 42rpx;
}
.idbtn {
/* background:rgba(251,175,51,.6); */
/* border-radius:50rpx; */
/* padding:2rpx 20rpx; */
box-sizing: border-box;
font-size: 30rpx;
/* font-weight:bold; */
color: rgba(255, 255, 255, 1);
text-align: center;
display: inline;
}
/* 充值 */
.chongzbox {
width: 100%;
background: rgba(255, 255, 255, 1);
border-radius: 14rpx;
padding: 40rpx 0;
box-sizing: border-box;
background-size: cover;
}
.yuebox {
width: 50%
}
/* 全部订单 */
.xiangyouimg {
width: 12rpx;
height: 24rpx;
}
.dukuanimg {
width: 40rpx;
height: 40rpx;
}
.dukuanshu {
width: 35rpx;
height: 35rpx;
position: absolute;
top: -25rpx;
right: -25rpx;
background: rgba(255, 105, 0, 1);
border: 1px solid rgba(255, 255, 255, 1);
border-radius: 50%;
font-size: 24rpx;
font-weight: 500;
color: rgba(255, 255, 255, 1);
line-height: 34rpx;
text-align: center;
}
.xlimg {
width: 160rpx;
height: 160rpx;
}
/* 合伙人 */
.hehuoimg {
width: 100%;
height: 160rpx;
border-radius: 15rpx;
overflow: hidden;
}
/* 底部 */
.tubiaoimg_a {
width: 44rpx;
height: 36rpx;
}
.tubiaoimg {
width: 80rpx;
height: 80rpx;
}
.tubiaoimg_b {
width: 55rpx;
height: 55rpx;
}
.tubiaobox {
position: relative;
width: 25%;
}
.logisticsbox {
background-color: rgba(247, 247, 247, 1);
padding: 10rpx 0;
align-items: center;
}
.logisticsimg {
height: 75rpx;
width: 75rpx;
}
.newmessage {
width: 5%;
text-align: center;
padding: 0rpx 10rpx 2rpx 20rpx;
font-size: 18rpx;
line-height: 20rpx;
color: rgba(150, 150, 150, 1);
font-family: PingFang SC;
}
.userbannercontent {
display: flex;
justify-content: space-between;
margin-top: 30rpx;
flex-wrap: wrap;
}
.tuijianTitle {
font-weight: bold;
letter-spacing: 18rpx;
padding: 0 0 0 20rpx;
background-image: url(https://luma.jxdsy.cn/static/applet5/images/percenter/tuijian.png);
background-repeat: no-repeat;
width: 50%;
background-size: 100% 100%;
text-align: center;
margin: 0 auto;
}
.mwchiimg {
width: 43rpx;
height: 43rpx;
}
.topbais {
z-index: 12;
width: 100%;
height: 160rpx;
background: #FF0202;
padding: 0 24rpx;
box-sizing: border-box;
-webkit-animation-name: sefddfss;
/*关键帧名称*/
-webkit-animation-timing-function: ease;
/*动画的速度曲线*/
-webkit-animation-iteration-count: 1;
/*动画播放的次数*/
-webkit-animation-duration: 1s;
/*动画所花费的时间*/
}
@keyframes sefddfss {
/*定义关键帧、scaleDrew是需要绑定到选择器的关键帧名称*/
0% {
opacity: 0
/*开始为原始大小*/
}
10% {
opacity: .2
/*放大1.1倍*/
}
20% {
opacity: .4
}
30% {
opacity: .6
}
40% {
opacity: .8
/*放大1.1倍*/
}
50% {
opacity: .9
}
60% {
opacity: .95
}
70% {
opacity: 1
}
}
.zan-dialog__mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
background: rgba(0, 0, 0, 0);
background: rgba(0, 0, 0, 0.4);
display: none;
}
.zan-dialog__container {
position: fixed;
bottom: 35%;
width: 100%;
/* background: #f8f8f8; */
transform: translateY(300%);
transition: all 0.4s ease;
z-index: 12;
/* border-radius: 20rpx; */
/* box-shadow: 0px 3px 3px 2px gainsboro; */
}
.tanchuang1 {
width: 600rpx;
margin: 0 auto;
background: #f8f8f8;
border-radius: 20rpx;
overflow: hidden;
}
.biaotiz {
font-size: 40rpx;
font-weight: 600;
color: #000000;
width: 100%;
height: 110rpx;
text-align: center;
line-height: 110rpx;
}
.biaotizi {
font-size: 30rpx;
font-weight: 400;
color: #6b6b6b;
width: 100%;
height: 100rpx;
text-align: center;
padding: 0 80rpx;
box-sizing: border-box;
}
.btnzbc {
text-align: center;
line-height: 100rpx;
width: 50%;
height: 100rpx;
font-size: 35rpx;
font-weight: 400;
color: #000000;
}
.zan-dialog--show .zan-dialog__container {
transform: translateY(0);
}
.zan-dialog--show .zan-dialog__mask {
display: block;
}
.linegoodsimg {
border-radius: 10rpx;
display: inline-block;
height: 120rpx;
width: 100%;
}
/* 福利商城板块 */
.Mallwelfare.on{
/* padding-top: 732rpx; */
}
.fulishowhead.on{
/* position: fixed;
top:0;
left: 0;
z-index: 999;
width: 100vw; */
}
.bannerimg .img {
width: 100%;
display: block;
height: 326rpx; }
.malltab {
height: 85rpx;
background-color: #FFFFFF; }
.malltab .malltabitem {
height: 85rpx;
width: 50%;
text-align: center;
font-size: 32rpx;
color: #000000; }
.malltab .malltabitem.active1 {
color: #fff;
font-size: 32rpx;
background: linear-gradient(-135deg, transparent 30px, #F64F15 0) top right; }
.malltab .malltabitem.active2 {
color: #fff;
font-size: 32rpx;
background: linear-gradient(45deg, transparent 30px, #F64F15 0) top left; }
.categorytab {
height: 92rpx;
background: white;
border-top: 1px solid #E7E4E4; }
.categorytab .tabsitem {
min-width: 75px;
line-height: 92rpx;
text-align: center;
display: inline-block; }
.categorytab .tabsitem .title {
display: inline-block;
height: 92rpx;
line-height: 92rpx;
font-size: 30rpx;
color: black; }
.categorytab .tabsitem .activetwo.title {
color: #f64f15;
font-weight: bold; }
.categorytab .tabsitem .actives.title {
color: #F64F15;
font-size: 32rpx; }
.mallgoodslist {
padding: 20rpx 25rpx; }
.mallgoodslist .goodsfareitem {
width: 342rpx;
border-radius: 14rpx;
background-color: #FFFFFF;
margin-bottom: 24rpx; }
.mallgoodslist .goodsfareitem .img {
width: 342rpx;
height: 313rpx;
border-radius: 14rpx 14rpx 0px 0px; }
.mallgoodslist .goodsfareitem .goodsfareitem_body {
padding: 20rpx 12rpx; }
.mallgoodslist .goodsfareitem .goodsfareitem_body .faretit {
color: #000000;
height: 80rpx;
font-size: 30rpx; }
.mallgoodslist .goodsfareitem .goodsfareitem_body .f_sales {
color: #999999;
font-size: 22rpx;
padding-top: 12rpx;
padding-bottom: 20rpx; }
.mallgoodslist .goodsfareitem .goodsfareitem_body .fare_foot .pricebox {
color: #F64F15; }
.mallgoodslist .goodsfareitem .goodsfareitem_body .fare_foot .Symbol {
font-size: 24rpx; }
.mallgoodslist .goodsfareitem .goodsfareitem_body .fare_foot .numbers {
font-size: 30rpx;
font-weight: bold; }
.mallgoodslist .goodsfareitem .goodsfareitem_body .fare_foot .comcard text {
font-size: 26rpx;
padding: 0 5rpx 6rpx 5rpx; }
.mallgoodslist .goodsfareitem .goodsfareitem_body .fare_foot .comcard {
padding: 0 14rpx;
position: relative;
min-width: 157rpx;
height: 40rpx;
background-color: #F8B849;
font-size: 20rpx;
color: #fff;
border-radius: 4rpx;
box-sizing: border-box;
}
.mallgoodslist .goodsfareitem .goodsfareitem_body .fare_foot .comcard1 {
background-color: #FC4456; }
.mallgoodslist .goodsfareitem .goodsfareitem_body .fare_foot .comcard::before, .mallgoodslist .goodsfareitem .goodsfareitem_body .fare_foot .comcard::after {
content: "";
width: 24rpx;
height: 24rpx;
border-radius: 50%;
position: absolute;
z-index: 10;
background-color: #fff; }
.mallgoodslist .goodsfareitem .goodsfareitem_body .fare_foot .comcard::before {
left: -12rpx; }
.mallgoodslist .goodsfareitem .goodsfareitem_body .fare_foot .comcard:after {
right: -12rpx; }
/* 分享的弹窗 cope /pages/index/TaobaoAlliance/TaobaoAlliance */
.popupbox{
width: 100%;
height: 100vh;
}
.popupimg{
width: 100%;
}
.guanbi{
width: 72rpx;
height: 72rpx;
}
.popspimg{
width: 120rpx;
height: 120rpx;
border-radius: 6rpx;
z-index: 1;
}
.poptext{
z-index: 1;
max-width: 282rpx;
font-size: 32rpx;
font-weight: 600;
color: #424242;
}
.taobaokl{
width: 436rpx;
background: #F3F3F3;
border-radius: 4rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
z-index: 1;
font-size: 24rpx;
font-weight: 400;
color: #424242;
}
.inputbox{
width:100%;
height:70rpx;
background:rgba(239,239,239,1);
border-radius:6rpx;
position: relative;
}
.inputs{
width:100%;
height:70rpx;
font-size: 30rpx;
line-height: 70rpx;
background:rgba(239,239,239,1);
border-radius:6rpx;
padding-left: 70rpx;
box-sizing: border-box;
}
.imgs{
width:28rpx;
height:28rpx;
position: absolute;
left: 10px;
top:10px;
}
.zan-dialog__mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0.4);
display: none;
}
.zan-dialog__container1 {
position: fixed;
top: 0;
width: 100%;
height: 100vh;
/* background: #f8f8f8; */
transform: translateY(300%);
transition: all 0.4s ease;
z-index: 12;
/* border-radius: 20rpx; */
/* box-shadow: 0px 3px 3px 2px gainsboro; */
}
.zan-dialog--show .zan-dialog__container1 {
transform: translateY(0);
}
.zan-dialog--show .zan-dialog__mask {
display: block;
}
.emptybox{
width: 100%;
text-align: center;
}
/* 福利商城板块end */
.followbox{
box-sizing: border-box;
height: 125rpx;
padding: 0 30rpx ;
background-size: cover;
background-repeat: no-repeat;
}
.lefttxts{
padding-left: 70rpx;
}
.lefttxts .soves{
color: #000000;
font-size: 30rpx;
font-weight: bold;
}
.lefttxts .twolines{
color: #999999;
font-size: 24rpx;
/* margin: 5px 0 0 0; */
font-weight: 500;
}
.sovesbtn{
width: 130rpx;
height: 50rpx;
line-height: 50rpx;
background-color: #ff6415;
color: #fff;
border-radius: 30rpx;
text-align: center;
font-size: 30rpx;
}
.sovesbtn text{
font-size: 30rpx;
}
/* //鹿马拼 */
.lmpingrukou{
}
.pingnavs{
padding-bottom: 20rpx;
padding-top: 24rpx;
}
.pingnavs .pingnavitem{
text-align: center;
}
.pingnavitem .rukouimg{
width: 51rpx;
height: 56rpx;
margin: 0 auto;
margin-bottom: 10rpx;
}
.pingnavitem .rukoutit{
color: #000000;
font-size: 30rpx;
}
\ No newline at end of file
......@@ -22,6 +22,12 @@ import {getUserInfo} from "../api/user";
"selectedIconPath": "/images/newtabbar/a1.png"
},
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "/images/newtabbar/tab1_0.png",
"selectedIconPath": "/images/newtabbar/tab1_1.png"
},
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment