Authored by 肖亚东

个人中心以及登录功能

... ... @@ -11,17 +11,17 @@ import './router/index';
import event from './utils/event.js';
import { logEvent,
YB_LAUNCH_APP,
YB_EXIT_APP,
YB_ENTER_FOREGROUND,
YB_ENTER_BACKGROUND,
YB_PAGE_OPEN_L,
YB_AWAKE_MP,
YB_SERVICE_PUSH,
YB_WX_SCAN_CODE,
YB_SHARE_UNION_TYPE
} from './libs/analytics.js';
// import { logEvent,
// YB_LAUNCH_APP,
// YB_EXIT_APP,
// YB_ENTER_FOREGROUND,
// YB_ENTER_BACKGROUND,
// YB_PAGE_OPEN_L,
// YB_AWAKE_MP,
// YB_SERVICE_PUSH,
// YB_WX_SCAN_CODE,
// YB_SHARE_UNION_TYPE
// } from './libs/analytics.js';
import { appReport } from './libs/appReport.js';
... ... @@ -114,12 +114,12 @@ App({
let timestamp = new Date().getTime() + ''
this.globalData.sid = md5(timestamp);
if (options){
let channel = options.query.channel;
let channelType = options.query.type;
let params = { 'CHANNEL': channel, 'TYPE': channelType };
logEvent(YB_LAUNCH_APP, params, this);
}
// if (options){
// let channel = options.query.channel;
// let channelType = options.query.type;
// let params = { 'CHANNEL': channel, 'TYPE': channelType };
// logEvent(YB_LAUNCH_APP, params, this);
// }
setTimeout(function () {
wechatLoginAction(function (response) {
... ... @@ -131,7 +131,7 @@ App({
},
addListener() {
event.on('anchor-click', params => { // anchor组件中点击时上报楼层点击事件
logEvent('YB_MAIN_EVENT', params);
// logEvent('YB_MAIN_EVENT', params);
});
},
//当应用程序进入前台显示状态时触发
... ... @@ -151,7 +151,7 @@ App({
}
}
}
logEvent(YB_SHARE_UNION_TYPE, shareParams, that)
// logEvent(YB_SHARE_UNION_TYPE, shareParams, that)
let path = '';
if (options && options.path) {
path = options.path
... ... @@ -162,10 +162,9 @@ App({
params = {
PAGE_PATH: path
};
logEvent(YB_ENTER_FOREGROUND, params, that)
// logEvent(YB_WX_SCAN_CODE, params, that);
// logEvent(YB_ENTER_FOREGROUND, params, that)
if (that.globalData.hasReportAwakeAction==='false'){
logEvent(YB_AWAKE_MP, params, this);
// logEvent(YB_AWAKE_MP, params, this);
that.globalData.hasReportAwakeAction = 'true'
}
... ... @@ -178,7 +177,7 @@ App({
let param = {
MSG_ID: options.query.msg_id
}
logEvent(YB_SERVICE_PUSH, param,that);
// logEvent(YB_SERVICE_PUSH, param,that);
}
}else{
... ... @@ -192,8 +191,8 @@ App({
//当应用程序进入后台状态时触发
onHide () {
let params = {};
logEvent(YB_ENTER_BACKGROUND,params)
// let params = {};
// logEvent(YB_ENTER_BACKGROUND,params)
appReport('start', "LIFECYCLE", "STOP", {},this)
},
onPageNotFound(res) {
... ... @@ -415,21 +414,20 @@ App({
获取分享信息
*/
getShareInfo: function () {
// console.log('getShareInfo');
let param = {
share_id: this.globalData.shareId,
}
let that = this;
GET(API_HOST + '/operations/api/v5/webshare/getShare', param)
.then(data => {
// console.log(data)
if (data && data.code == 200) {
that.globalData.shareInfo = data.data;
}
})
.catch(error => {
// console.log(error)
});
// let param = {
// share_id: this.globalData.shareId,
// }
// let that = this;
// GET(API_HOST + '/operations/api/v5/webshare/getShare', param)
// .then(data => {
// // console.log(data)
// if (data && data.code == 200) {
// that.globalData.shareInfo = data.data;
// }
// })
// .catch(error => {
// // console.log(error)
// });
},
checkUDID:function(){
... ...
... ... @@ -10,7 +10,8 @@
"pages/community/community",
"pages/brands/brands",
"pages/brands/brandDetail",
"pages/webview/webview"
"pages/webview/webview",
"pages/bindPhoneNumber/bindPhoneNumber"
],
"window": {
"navigationBarTextStyle": "white",
... ...
... ... @@ -13,7 +13,8 @@
<format-img
width="{{492}}"
height="{{232}}"
src="{{item.src}}">
src="{{item.src}}"
default-width="true">
</format-img>
</anchor>
</swiper-item>
... ...
.schedule-item {
margin: 0 30rpx;
margin: 0 30rpx 40rpx 30rpx;
width: 690rpx;
height: 208rpx;
display: flex;
... ...
... ... @@ -38,7 +38,7 @@ Component({
selectIndex: data.index,
toView: `tab-${data.index - 1}`
})
this.triggerEvent('SelectTab', { index: data.index } );
this.triggerEvent('selectTab', { index: data.index } );
}
}
})
... ...
Component({
properties: {
title: {
type: String,
value: ""
},
moreTitle: {
type: String,
value: ""
},
hasMore: {
type: Boolean,
value: false
},
},
methods: {
tapMore(e) {
this.triggerEvent('tapMore');
},
}
});
... ...
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
... ...
<view class="container">
<view class="header">
<text class='header-title'>{{title}}</text>
<view wx:if="{{hasMore}}" class="more-view" bindtap="tapMore">{{moreTitle}}
<image class="more-icon" src="../../../static/images/more@3x.png"></image>
</view>
</view>
</view>
\ No newline at end of file
... ...
.header {
width: 100%;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.header-title {
font-family: PingFang-SC-Medium;
font-weight: bold;
font-size: 32rpx;
color: #444444;
letter-spacing: 0;
margin-left: 30rpx;
}
.more-view {
font-family: PingFang-SC-Regular;
font-size: 28rpx;
color: #B0B0B0;
letter-spacing: 0;
}
.more-icon {
width: 14rpx;
height: 21rpx;
margin-right: 30rpx;
}
... ...
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
... ...
... ... @@ -5,7 +5,7 @@
<image src="../../../static/images/left_arraw@3x.png" class="left-slide" bindtap="leftSlide"></image>
<swiper class="scroll-box" wx:if="{{list.length > 0}}" bindchange="swiperChange" current="{{swiperCurrent}}">
<block wx:for="{{list}}">
<block wx:for="{{list}}" wx:key="index">
<swiper-item>
<view class="card">
<text>{{item}}</text>
... ...
Component({
properties: {
undoneData: null,
},
methods: {
tapAllOrders() {
this.triggerEvent('jumpAllOrders');
undoneData: {
type: Object,
},
},
data:{
},
methods: {
tapButtonAction(e) {
let actionType = e.currentTarget.dataset.actionType;
this.triggerEvent('tapButton', actionType);
... ...
<view class="container">
<view class="header">
<text class='header-title'>{{undoneData.headerTitle}}</text>
<view wx:if="{{!undoneData.isActivity}}" class="all-orders" bindtap="tapAllOrders">全部订单
<image class="more" src="../../../static/images/more@3x.png"></image>
</view>
</view>
<view class="content">
<text class='undone-tips'>{{undoneData.undoneTips}}</text>
<view class="button-tips" bindtap="tapButtonAction" data-action-type="{{undoneData.actionType}}">{{undoneData.buttonTips}}</view>
... ...
... ... @@ -3,36 +3,6 @@
height: 362rpx;
}
.header {
width: 100%;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.header-title {
font-family: PingFang-SC-Medium;
font-weight: bold;
font-size: 32rpx;
color: #444444;
letter-spacing: 0;
margin-left: 30rpx;
}
.all-orders {
font-family: PingFang-SC-Regular;
font-size: 28rpx;
color: #B0B0B0;
letter-spacing: 0;
}
.more {
width: 14rpx;
height: 21rpx;
margin-right: 30rpx;
}
.content {
display: flex;
flex-direction: column;
... ...
... ... @@ -35,53 +35,53 @@ let getDeviceInfo = function (app) {
}
let appReport = function(reportType, pt, pn, param,appObject) {
let app = appObject;
let deviceInfo = getDeviceInfo(app)
if (!pt || !pn || !deviceInfo || !deviceInfo.dm) return;
if(!param)param = {};
if(!reportType)reportType='hb';
let ts = new Date().getTime() + '000000';
let uid = app && app.globalData && app.globalData.userInfo && app.globalData.userInfo.uid ? md5(`${app.globalData.userInfo.uid}`) : '';
if(!uid){
uid = md5(`${app.getUid()}`);
}
let sid = app && app.globalData && app.globalData.sid ? app.globalData.sid : '';
let networkType = app && app.globalData && app.globalData.networkType ? app.globalData.networkType : '0';
let event = {}
event.ps = '0',
event.av = APP_VERSION,
event.ab = APP_BUILD,
event.ca = '0',
event.net = networkType,
event.sid = sid,
event.uid = uid,
event.ts = ts,
event.pt = pt,
event.pn = pn,
event.param = param
let events = [];
events.push(event)
//组装最终要上报的数据
let parameters = {};
parameters.type = reportType,
parameters.device = deviceInfo,
parameters.events = events,
APP_REPORT(APP_REPORT_HOST, parameters)
.then(function (data) {
// console.log(data)
})
.catch(function (error) {
});
// let app = appObject;
// let deviceInfo = getDeviceInfo(app)
// if (!pt || !pn || !deviceInfo || !deviceInfo.dm) return;
// if(!param)param = {};
// if(!reportType)reportType='hb';
// let ts = new Date().getTime() + '000000';
// let uid = app && app.globalData && app.globalData.userInfo && app.globalData.userInfo.uid ? md5(`${app.globalData.userInfo.uid}`) : '';
// if(!uid){
// uid = md5(`${app.getUid()}`);
// }
// let sid = app && app.globalData && app.globalData.sid ? app.globalData.sid : '';
// let networkType = app && app.globalData && app.globalData.networkType ? app.globalData.networkType : '0';
// let event = {}
// event.ps = '0',
// event.av = APP_VERSION,
// event.ab = APP_BUILD,
// event.ca = '0',
// event.net = networkType,
// event.sid = sid,
// event.uid = uid,
// event.ts = ts,
// event.pt = pt,
// event.pn = pn,
// event.param = param
// let events = [];
// events.push(event)
// //组装最终要上报的数据
// let parameters = {};
// parameters.type = reportType,
// parameters.device = deviceInfo,
// parameters.events = events,
// APP_REPORT(APP_REPORT_HOST, parameters)
// .then(function (data) {
// // console.log(data)
// })
// .catch(function (error) {
// });
}
... ...
... ... @@ -2,10 +2,10 @@
import Promise from '../vendors/es6-promise';
import { API_HOST, SERVICE_HOST } from './config';
import { GET, POST } from './request';
import {
logEvent,
YB_SHARE_UNION_TYPE
} from './analytics.js'
// import {
// logEvent,
// YB_SHARE_UNION_TYPE
// } from './analytics.js'
function getQRCodeSource(code) {
return new Promise(function (resolve, reject) {
... ... @@ -16,10 +16,10 @@ function getQRCodeSource(code) {
.then(data => {
if (data.code == 200) {
if(data.data){
let resultJson = JSON.parse(data.data);
if(resultJson){
logEvent(YB_SHARE_UNION_TYPE, resultJson);
}
// let resultJson = JSON.parse(data.data);
// if(resultJson){
// logEvent(YB_SHARE_UNION_TYPE, resultJson);
// }
resolve(JSON.parse(data.data));
}
}else {
... ...
// pages/choosecountry/choosecountry.js
'use strict';
import { API_HOST, SERVICE_HOST } from '../../libs/config';
import { GET, POST } from '../../libs/request';
import { getVerifyKey, bindAction, decodePhoneNumber, getUnionID, decodeUnionId, openAuthorizeSettings} from '../../utils/login';
let CHOOSED_COUNTRY_ID = 'CHOOSED_COUNTRY_ID'
let CHOOSED_COUNTRY_NAME = 'CHOOSED_COUNTRY_NAME'
let app = getApp();
const {extend,Toast} = require('../../vendors/zanui/index');
Page(extend({},Toast,{
/**
* 页面的初始数据
*/
data: {
country_name:'中国',
country_area:'86',
phoneNum:'',
verifyBtnText:'获取验证码',
counting:false,
verifyCode:'',
hasUnionID:'',
inviteCode: '',
h5back:'',
graphicsCodeSwitch: false,
graphicsCodeUrl: '',
tipText:'Yoho!Family账号可登录YOHO!旗下所有应用(含:Yoho!Buy有货、Yoho!Now、mars、BLK、Yoho!Store)',
graphicsCodeElement: [
{
// position: '0px 0px',
dataVal: 0,
},
{
// position: '-80px 0px',
dataVal: 0,
},
{
// position: '-160px 0px',
dataVal: 0,
},
{
// position: '-240px 0px',
dataVal: 0,
},
],
},
onLoad: function (options) {
// console.log("options",options)
var inviteCode = options.inviteCode ? options.inviteCode : '';
var h5back = options.h5back ? options.h5back:'';
this.setData({
hasUnionID: app.globalData.WXUnion_ID !== null && app.globalData.WXUnion_ID !== '' && app.globalData.WXUnion_ID !== undefined ? true:false,
inviteCode,
h5back,
})
new app.WeToast();
this.fetchImageCheck_SwitchOn();
},
onShow: function () {
let that = this;
wx.getStorage({
key: CHOOSED_COUNTRY_ID,
success: function (res) {
if (res.data.length>0) {
// console.log(res.data)
that.setData({ country_area: res.data});
}
}
})
wx.getStorage({
key: CHOOSED_COUNTRY_NAME,
success: function (res) {
if (res.data.length > 0) {
// console.log(res.data)
that.setData({ country_name : res.data});
}
}
})
},
fetchImageCheck_SwitchOn: function (event) {
let app = getApp();
let that = this;
let udid = app && app.globalData && app.globalData.udid ? app.globalData.udid : '';
var timeStamp = Date.parse(new Date());
let param = {
fromPage: 'bindPhoneNumber',
}
GET(API_HOST +'/smart/way', param)
.then(data => {
let graphicsCodeSwitch = data.data;
let graphicsCodeUrl = API_HOST + '/passport/img-check' + '?business_line=miniapp' + '&udid=' + udid + '&fromPage=' + 'bindPhoneNumber' + '&timeStamp=' + timeStamp;
that.setData({
graphicsCodeSwitch,
graphicsCodeUrl,
})
})
.catch(error => {
});
},
// calcPosition: function (i, dataVal) {
// let positionX, positionY;
// let index = i;
// let count = parseInt(dataVal, 10) + 1;
// let unit = 'px';
// positionX = -index * 80 + unit;
// positionY = -count * 80 + unit;
// return [positionX, positionY].join(' ');
// },
didSelectImage: function (e) {
let index = e.currentTarget.dataset.itemindex;
let graphicsCodeElement = this.data.graphicsCodeElement;
let elem = graphicsCodeElement[index];
let dataVal = (parseInt(elem.dataVal)) % 4 + 1;
// let position = this.calcPosition(index, elem.dataVal);
// elem.position = position;
elem.dataVal = dataVal;
this.setData({graphicsCodeElement});
},
update: function (event) {
var timeStamp = Date.parse(new Date());
let udid = app && app.globalData && app.globalData.udid ? app.globalData.udid : '';
let graphicsCodeUrl = API_HOST + '/passport/img-check' + '?business_line=miniapp' + '&udid=' + udid + '&fromPage=' + 'bindPhoneNumber' + '&timeStamp=' + timeStamp;
console.log(graphicsCodeUrl)
this.setData({
graphicsCodeUrl,
})
},
/**
* 新的授权方式
*/
getUserInfo: function (e) {
var that = this;
if (e.detail.errMsg === 'getUserInfo:ok') {
decodeUnionId(app.getWechatThirdSession(), e, function (response) {
if (response.isHaveUnionID) {
that.setData({
hasUnionID: true,
});
}
});
} else {
openAuthorizeSettings(function (response) {
if (response.isHaveUnionID) {
that.setData({
hasUnionID: true,
})
};
if (response.succeed === true) {
} else {
// console.log("根据unionid没有查询到uid,需要再次点击授权getPhoneNumber")
}
});
}
},
getPhoneNumber: function (e) {
var that = this;
// console.log(e)
// console.log(e.detail.errMsg)
if (e.detail.errMsg === 'getPhoneNumber:ok') {
decodePhoneNumber(e.detail.iv, e.detail.encryptedData, '', function (result) {
// console.log('!!!!result', result)
if (result.code != 200) {
that.wetoast.toast({
title: result.message,
titleClassName: 'wetoast-title',
duration: 1000
});
} else {
if(result.succeed){
//如果是从h5页面唤起,则重新用webview 打开h5链接;其他页面直接返回上一层
if (that.data.h5back){
wx.setStorageSync('h5backReload', that.data.h5back);
wx.navigateBack({
delta: 1,
});
}else{
if (result.is_register){
that.showZanToast({
title: '欢迎加入Yoho!Family!新人礼包已发放到个人中心-优惠券,请注意查收', success: function () {
let prePage = getCurrentPages();
that.newCustomerStorage();
if (prePage.length > 1 && prePage[prePage.length - 2].bindPhoneNumComplete != undefined) {
prePage[prePage.length - 2].bindPhoneNumComplete();
}
wx.navigateBack({
delta: 1,
})
}
}, 1500);
} else {
let prePage = getCurrentPages();
that.newCustomerStorage();
if (prePage.length > 1 && prePage[prePage.length - 2].bindPhoneNumComplete != undefined) {
prePage[prePage.length - 2].bindPhoneNumComplete();
}
wx.navigateBack({
delta: 1,
})
}
}
}
}
})
} else {
// let needBind = true;
// that.setData({ needBind });
// that.loginAndRegisterTapped(true);
}
},
chooseCountry:function(){
wx.navigateTo({
url: '/pagesSecond/pages/choosecountry/choosecountry',
})
},
getVerifyCode:function() {
let that = this
if (that.data.counting) {
return;
}
that.data.counting = true;
if (that.data.phoneNum == "" || that.data.phoneNum == undefined || that.data.phoneNum == null) {
that.wetoast.toast({
title: "手机号不能为空",
titleClassName: 'wetoast-title',
duration: 1500
});
that.data.counting = false;
return;
}
let fromPage = 'bindPhoneNumber';
let degrees = '';
for (var i = 0; i < that.data.graphicsCodeElement.length; i++) {
let item = that.data.graphicsCodeElement[i];
let dataVal = item.dataVal;
if (i == 0){
degrees = dataVal + ','
} else if (i == that.data.graphicsCodeElement.length - 1){
degrees = degrees + '' + dataVal;
} else {
degrees = degrees + '' + dataVal + ',';
}
}
getVerifyKey(that.data.phoneNum, that.data.country_area, fromPage, degrees, function (result) {
let self = that
// console.log('result',result)
if (result.message && result.message != '')
self.wetoast.toast({
title: result.message,
titleClassName: 'wetoast-title',
duration: 1500
});
if (result.succeed) {
that.fetchImageCheck_SwitchOn();
let countDownNumb = 60;
let timer = setInterval(function () {
countDownNumb--;
if (countDownNumb < 0) {
self.setData({
verifyBtnText: "重新发送",
counting: false,
})
clearInterval(timer);
} else {
self.setData({
verifyBtnText: countDownNumb + "s",
counting: true,
})
}
}, 1000);
// if (callBackFun)
// callBackFun(result);
}
else {
self.setData({
counting: false,
})
// if (callBackFun)
// callBackFun(result);
}
});
},
phoneInputChanged:function (e) {
let that = this
that.setData({
phoneNum: e.detail.value
})
that.setData({
disabledClass: that.data.phoneNum && that.data.verifyCode ? "" : "disabled"
})
},
verifyCodeInputChanged:function (e) {
let that = this
that.setData({
verifyCode: e.detail.value,
});
that.setData({
disabledClass: that.data.phoneNum && that.data.verifyCode ? "" : "disabled"
})
},
verifyBtnAction:function(){
let that = this;
let app = getApp()
this.setData({
hasUnionID: app.globalData.WXUnion_ID !== null && app.globalData.WXUnion_ID !== '' && app.globalData.WXUnion_ID !== undefined ? true : false,
})
if (wx.getSetting){
wx.getSetting({
success: (res) => {
// console.log("userInfo:", res.authSetting["scope.userInfo"])
if (res.authSetting["scope.userInfo"] !== null && res.authSetting["scope.userInfo"] !== undefined && res.authSetting["scope.userInfo"] === false) {
wx.showModal({
title: '',
content: '检测到您未打开微信用户信息授权,开启后即可进行登录',
confirmText: "去开启",
confirmColor: "#000000",
success: function (res) {
if (res.confirm) {
wx.openSetting({
success: (res) => {
// console.log(res.authSetting["scope.userInfo"])
if (res.authSetting["scope.userInfo"] !== null && res.authSetting["scope.userInfo"] !== undefined && res.authSetting["scope.userInfo"] === true) {
getUnionID(app.getWechatThirdSession(), function (response) {
if (response.succeed === true) {
let that = this
if (that.data.h5back) {
wx.setStorageSync('h5backReload', that.data.h5back);
wx.navigateBack({
delta: 1,
})
}else{
wx.navigateBack({
delta: 1,
})
}
}
})
}
}
})
} else {
}
}
})
} else {
}
}
})
} else {
wx.showModal({
title: '提示',
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
})
}
},
bindBtnAction:function (needBind, callBackFun) {
let that = this
// console.log('phoneNumber,verifyCode', that.data.phoneNum, that.data.verifyCode)
if (!that.data.phoneNum) {
that.wetoast.toast({
title: '请输入有效手机号',
titleClassName: 'wetoast-title',
duration: 1500
});
return;
}
if (!that.data.verifyCode) {
that.wetoast.toast({
title: '请输入有效验证码',
titleClassName: 'wetoast-title',
duration: 1500
});
return;
}
bindAction(that.data.phoneNum, that.data.verifyCode, that.data.country_area, that.data.inviteCode, function (result) {
// console.log("result:",result)
if (result.message)
that.wetoast.toast({
title: result.message,
titleClassName: 'wetoast-title',
duration: 1500
});
if (result.succeed) {
//新人toast提示
if (result.is_register) {
that.showZanToast({ title:'欢迎加入Yoho!Family!新人礼包已发放到个人中心-优惠券,请注意查收',success: function(){
that.redirectAction();
}},1500);
} else {
that.redirectAction();
}
}
})
},
/**
* 页面跳转
*/
redirectAction: function() {
let that = this;
if (that.data.h5back) {
wx.setStorageSync('h5backReload', that.data.h5back);
wx.navigateBack({
delta: 1,
})
} else {
let prePage = getCurrentPages();
that.newCustomerStorage();
if (prePage.length > 1 && prePage[prePage.length - 2].bindPhoneNumComplete != undefined) {
prePage[prePage.length - 2].bindPhoneNumComplete();
}
// console.log("currentPage:", getCurrentPages())
wx.navigateBack({
delta: 1,
})
return
}
},
// 新人楼层标示newCustomer
newCustomerStorage: function() {
try {
wx.setStorage({
key:"newCustomer",
data:true
})
} catch (e) {
// console.error(e);
}
}
}))
\ No newline at end of file
... ...
{
"navigationBarTitleText": "手机号登录"
}
\ No newline at end of file
... ...
<view class='view-container'>
<view class='new-view-title'>手机号登录</view>
<view class='new-view-tip'>{{tipText}}</view>
<view class='new-phonenum-container'>
<text class='new-phone-title' bindtap="chooseCountry">{{'+'+country_area}}</text>
<view style='width:20rpx;height:20rpx;margin-left:4rpx;display:flex;' bindtap="chooseCountry">
<image style='width:100%;height:20rpx' src='./images/down_arrow.png'></image>
</view>
<input class="new-phoneNumberContent" placeholder="请输入手机号" bindinput="phoneInputChanged" placeholder-style="color:#b0b0b0;font-size:28rpx" style="margin-top:0rpx;"/>
</view>
<view class='new-phonenum-container'>
<text class='new-verfity-code-title'>验证码</text>
<input maxlength="10" class="new-verifyCondeContent" placeholder="请输入验证码" bindinput="verifyCodeInputChanged" placeholder-style="color:#b0b0b0;font-size:28rpx"/>
<view catchtap="getVerifyCode" class="new-view-getVerifyCode enable">{{verifyBtnText == undefined ? '获取验证码' : verifyBtnText}}</view>
</view>
<block wx:if="{{graphicsCodeSwitch}}">
<view class='new-graphicsHeaderView'>
<text class='graphics-title'>请将下列图片点击翻转至正向朝上</text>
<text class='graphics-title' style='color:#D0021B' catchtap="update">换一批</text>
</view>
<view class='graphicsContentView'>
<view class='itemView' data-itemIndex='0' catchtap="didSelectImage">
<image class='item{{graphicsCodeElement[0].dataVal}} image0' src="{{graphicsCodeUrl}}"></image>
</view>
<view class='itemView' data-itemIndex='1' catchtap="didSelectImage">
<image class='item{{graphicsCodeElement[1].dataVal}} image1' src="{{graphicsCodeUrl}}"></image>
</view>
<view class='itemView' data-itemIndex='2' catchtap="didSelectImage">
<image class='item{{graphicsCodeElement[2].dataVal}} image2' src="{{graphicsCodeUrl}}"></image>
</view>
<view class='itemView' data-itemIndex='3' catchtap="didSelectImage">
<image class='item{{graphicsCodeElement[3].dataVal}} image3' src="{{graphicsCodeUrl}}"></image>
</view>
</view>
</block>
<button catchtap="bindBtnAction" class="view-bindBtn {{disabledClass == undefined ? 'disabled' : disabledClass}}" >完成</button>
<button class="view-verifyBtn" open-type="{{hasUnionID?'getPhoneNumber':'getUserInfo'}}" bindgetphonenumber="getPhoneNumber" bindgetuserinfo='getUserInfo'>自动验证</button>
</view>
<view class='view-container'></view>
<import src="../../vendors/zanui/toast/index.wxml"/>
<template is="zan-toast" data="{{zanToast}}"/>
<import src="../../vendors/toast/wetoast.wxml"/>
<template is="wetoast" data="{{...__wetoast__}}"/>
\ No newline at end of file
... ...
/* bindPhoneView.wxss */
.commodity_screen {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
opacity: 0.2;
overflow: hidden;
z-index: 1000;
color: #fff;
}
.commodity_attr_box {
width: 100%;
overflow: hidden;
position: fixed;
bottom: 0;
left: 0;
z-index: 2000;
background: #f0f0f0;
padding-top: 20rpx;
}
.view-title {
font-size: 50rpx;
width: 100%;
height: 140rpx;
line-height: 210rpx;
text-align: left;
font-family: PingFang SC;
padding-left: 76rpx;
}
.container {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
}
.container .view-tip {
font-size: 24rpx;
height: wrap;
/* padding-left: 76rpx; *//* padding-right: 43rpx; *//* text-align: left; */
font-family: PingFang SC;
padding-top: 20rpx;
color: #b0b0b0;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.view-tip-text {
width: 598rpx;
font-size: 24rpx;
text-align: left;
word-break: break-all;
}
.phoneNumberContent {
width: 70%;
margin-right: auto;
padding-left: 70rpx;
font-size: 28rpx;
font-family: PingFang SC;
text-align: left;
}
.verifyCondeContent {
width: 60%;
margin-right: auto;
/* padding-left: 5%; */
font-size: 28rpx;
font-family: PingFang SC;
text-align: left;
}
.view-verifyKeyInputContainer {
width: 40%;
display: flex;
flex-direction: column;
position: relative;
}
.view-bindBtn {
width: 100%;
height: 100rpx;
margin-left: auto;
margin-right: auto;
font-size: 35rpx;
text-align: center;
line-height:100rpx;
margin-top: 80rpx;
background-color: #444;
color: white;
font-family: PingFang SC;
border-radius: 6rpx;
}
.view-bindBtn::after{border: none}
.view-verifyBtn {
width: 100%;
height: 100rpx;
margin-left: auto;
margin-right: auto;
font-size: 35rpx;
text-align: center;
justify-content: center;
line-height:100rpx;
margin-top: 10px;
background-color: #444;
color: white;
font-family: PingFang SC;
border-radius: 6rpx;
/* line-height: 100rpx; */
}
.view-verifyBtn::after{border: none}
.disabled {
background-color: #b0b0b0 !important;
}::after{border: none}
.view-getVerifyCode {
position: absolute;
max-width: 152rpx;
width: wrap;
border-radius: 200rpx;
height: 48rpx;
/* bottom: 8px; */
right: 74rpx;
z-index: 9999;
color: white;
font-size: 22rpx;
text-align: center;
line-height: 22px;
font-family: PingFang SC;
/* padding-top: 10rpx; */
padding-left: 20rpx;
padding-right: 20rpx;
}
.disable {
background-color: #b0b0b0;
}
.enable {
background-color: #444;
}
.line {
margin-top: 20rpx;
margin-left: 76rpx;
margin-right: 74rpx;
display: flex;
height: 1rpx;
background-color: #e0e0e0;
justify-content: center;
}
.countryCode {
display: flex;
padding-left: 35rpx;
flex-direction: row;
/* background-color: blue; */
}
.phoneNumber {
display: flex;
flex-direction: row;
align-items: center;
padding-left: 76rpx;
margin-top: 5%;
/* padding-top: 5%; */
}
.right-arrow {
width: 20rpx;
height: 12rpx;
margin-right: 20rpx;
}
.verifyCode {
display: flex;
flex-direction: row;
padding-left: 76rpx;
padding-top: 5%;
}
.verifyCodeTitle {
font-size: 28rpx;
color: #444;
padding-top: 10rpx;
width: 20%;
}
.countryTitle {
font-size: 28rpx;
color: #444;
width: 180rpx;
}
.countryContent {
font-size: 28rpx;
color: #444;
padding-left: 35rpx;
width: 100%;
}
.phoneTitle {
font-size: 28rpx;
color: #444;
/* margin-top: 30rpx; *//* padding-top: 5%; */
}
.graphicsHeaderView {
width: 100%;
height: 32rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 70rpx;
}
.graphicsHeaderView .title {
height: 32rpx;
font-family: PingFang-SC-Regular;
font-size: 24rpx;
color: #444;
margin-left: 76rpx;
}
.graphicsHeaderView .button {
height: 32rpx;
font-family: PingFang-SC-Regular;
font-size: 24rpx;
color: #d0021b;
margin-right: 74rpx;
}
.graphicsContentView {
width: 100%;
height: 136rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 20rpx;
}
.graphicsContentView .itemView {
width: 136rpx;
height: 136rpx;
/* margin-top: 20rpx; */
overflow: hidden;
border: 1rpx solid #e0e0e0;
}
.graphicsContentView .image0 {
width: 560rpx;
height: 560rpx;
}
.graphicsContentView .image1 {
width: 560rpx;
height: 560rpx;
margin-left: -140rpx;
}
.graphicsContentView .image2 {
width: 560rpx;
height: 560rpx;
margin-left: -280rpx;
}
.graphicsContentView .image3 {
width: 560rpx;
height: 560rpx;
margin-left: -420rpx;
}
.graphicsContentView .item0 {
margin-top: 0rpx;
}
.graphicsContentView .item1 {
margin-top: -140rpx;
}
.graphicsContentView .item2 {
margin-top: -280rpx;
}
.graphicsContentView .item3 {
margin-top: -420rpx;
}
/********以下为新的布局 **********/
.view-container {
margin-left: 76rpx;
margin-right: 74rpx;
width: 600rpx;
}
.new-view-title {
font-family: PingFangSC-Medium;
font-size: 48rpx;
color: #444;
letter-spacing: 0;
margin-top: 100rpx;
font-weight: bold;
}
.new-view-tip {
font-family: PingFang-SC-Regular;
font-size: 24rpx;
color: #b0b0b0;
letter-spacing: 0;
line-height: 34rpx;
margin-top: 16rpx;
width: 100%;
word-break: break-all;
}
.new-phonenum-container {
width: 100%;
height: 100rpx;
display: flex;
flex-direction: row;
align-items: center;
margin-top: 28rpx;
border-bottom: 1rpx solid #e0e0e0;
}
.new-phone-title {
font-family: SanFranciscoText-Regular;
font-size: 14px;
color: #444;
letter-spacing: 0;
line-height: 32rpx;
}
.new-phoneNumberContent {
flex: 1;
margin-left: 30rpx;
font-size: 36rpx;
font-family: SanFranciscoText-Regular;
text-align: left;
color: #444444;
}
.new-verfity-code-title {
font-family: PingFang-SC-Regular;
font-size: 14px;
color: #444;
letter-spacing: 0;
line-height: 40rpx;
}
.new-verifyCondeContent {
flex: 1;
margin-left: 20rpx;
font-size: 36rpx;
font-family: PingFang SC;
text-align: left;
color: #444444
}
.new-view-getVerifyCode {
width: 152rpx;
border-radius: 200rpx;
height: 48rpx;
color: white;
font-size: 22rpx;
text-align: center;
line-height: 32rpx;
font-family: PingFang SC;
display: flex;
align-items: center;
justify-content: center;
}
.new-graphicsHeaderView {
width: 100%;
height: 32rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 60rpx;
}
.graphics-title {
font-family: PingFangSC-Regular;
font-size: 12px;
color: #444;
letter-spacing: 0;
text-align: center;
line-height: 34rpx;
}
... ...
... ... @@ -105,6 +105,10 @@ Page({
this.setData({ searching: true });
},
handlerMove(){
},
})
function data_letter_sort(data) {
... ...
... ... @@ -53,15 +53,15 @@ Page({
var pages = getCurrentPages();
var currentPage = pages[pages.length - 1];
var url = currentPage.route;
let params = {
PAGE_NAME: this.data.current_page_name,
PAGE_PARAM: this.data.current_page_param,
FROM_PAGE_NAME: this.data.from_page_name,
FROM_PAGE_PARAM: this.data.from_page_param,
PV_ID: PV_ID,
PAGE_PATH: url,
};
logEvent(YB_PAGE_OPEN_L, params);
// let params = {
// PAGE_NAME: this.data.current_page_name,
// PAGE_PARAM: this.data.current_page_param,
// FROM_PAGE_NAME: this.data.from_page_name,
// FROM_PAGE_PARAM: this.data.from_page_param,
// PV_ID: PV_ID,
// PAGE_PATH: url,
// };
// logEvent(YB_PAGE_OPEN_L, params);
},
_init: function() {
return Promise.all([
... ...
... ... @@ -59,15 +59,15 @@ Page({
var pages = getCurrentPages();
var currentPage = pages[pages.length - 1];
var url = currentPage.route;
let params = {
PAGE_NAME: this.data.current_page_name,
PAGE_PARAM: this.data.current_page_param,
FROM_PAGE_NAME: this.data.from_page_name,
FROM_PAGE_PARAM: this.data.from_page_param,
PV_ID: PV_ID,
PAGE_PATH: url,
};
logEvent(YB_PAGE_OPEN_L, params);
// let params = {
// PAGE_NAME: this.data.current_page_name,
// PAGE_PARAM: this.data.current_page_param,
// FROM_PAGE_NAME: this.data.from_page_name,
// FROM_PAGE_PARAM: this.data.from_page_param,
// PV_ID: PV_ID,
// PAGE_PATH: url,
// };
// logEvent(YB_PAGE_OPEN_L, params);
},
_init: function() {
return this.loadMore();
... ...
... ... @@ -46,15 +46,15 @@ Page({
var pages = getCurrentPages();
var currentPage = pages[pages.length - 1];
var url = currentPage.route;
let params = {
PAGE_NAME: this.data.current_page_name,
PAGE_PARAM: this.data.current_page_param,
FROM_PAGE_NAME: this.data.from_page_name,
FROM_PAGE_PARAM: this.data.from_page_param,
PV_ID: PV_ID,
PAGE_PATH: url,
};
logEvent(YB_PAGE_OPEN_L, params);
// let params = {
// PAGE_NAME: this.data.current_page_name,
// PAGE_PARAM: this.data.current_page_param,
// FROM_PAGE_NAME: this.data.from_page_name,
// FROM_PAGE_PARAM: this.data.from_page_param,
// PV_ID: PV_ID,
// PAGE_PATH: url,
// };
// logEvent(YB_PAGE_OPEN_L, params);
},
_init: function(options) {
return this._getNav(options);
... ...
... ... @@ -230,10 +230,10 @@ Component({
var currentPage = pages[pages.length - 1]
var url = currentPage.route
let params = {
PAGE_PATH: url,
};
logEvent(YB_TO_OPEN_APP_C, params);
// let params = {
// PAGE_PATH: url,
// };
// logEvent(YB_TO_OPEN_APP_C, params);
},
launchAppError: function (e) {
... ... @@ -241,11 +241,11 @@ Component({
var currentPage = pages[pages.length - 1]
var url = currentPage.route
let params = {
PAGE_PATH: url,
OPEN_RESULT: 2
};
logEvent(YB_OPEN_APP_RESULT_L, params);
// let params = {
// PAGE_PATH: url,
// OPEN_RESULT: 2
// };
// logEvent(YB_OPEN_APP_RESULT_L, params);
wx.showToast({
title: '打开失败!您可能未安装Yoho!Buy官方APP,请下载后再尝试。',
... ...
import {API_HOST, SERVICE_HOST} from '../../libs/config';
import {GET, POST} from '../../libs/request';
import { loginAndRegisterTapped } from '../../utils/login';
var app = getApp()
Page({
data: {
array: [ { 'applyed': false, 'activityId': '123' }, { 'applyed': false, 'activityId': '456' }],
... ... @@ -26,7 +32,12 @@ Page({
applyAction(e) {
let activityId = e.detail.activityId;
let array = this.data.array;
if (app.globalData.userInfo.uid) {//已登录
} else {
loginAndRegisterTapped();
}
},
onHide: function() {
... ...
<view class="container">
<slide-bar content-array="{{contentArray}}" bindSelectTab="selectTab" select="{{select}}"></slide-bar>
<slide-bar content-array="{{contentArray}}" bind:selectTab="selectTab" select="{{select}}"></slide-bar>
<view class="time-title">14:00:00</view>
<block wx:for="{{array}}" wx:key="index">
... ... @@ -11,7 +11,6 @@
<view class="time-title">20:00:00</view>
<block wx:for="{{array}}" wx:key="index">
<schedule-item data="{{item}}"></schedule-item>
<view wx:if="{{index!=array.length-1}}" class="space-view40"></view>
</block>
</view>
\ No newline at end of file
... ...
.container {
width: 100%;
height: 100%;
margin-bottom: 30rpx;
}
.time-title {
... ... @@ -12,7 +11,3 @@
letter-spacing: -0.38px;
margin: 60rpx 30rpx 20rpx 30rpx;
}
.space-view40 {
height: 40rpx;
}
\ No newline at end of file
... ...
import {API_HOST, SERVICE_HOST} from '../../libs/config';
import {GET, POST} from '../../libs/request';
import jumpToMiniapp from '../../router/jump-to-miniapp';
import wx from '../../utils/wx';
import { decodePhoneNumber, wechatLoginAction, getUnionID, decodeUnionId, openAuthorizeSettings, listen} from '../../utils/login';
const ACTION_TYPE = {
GOBUY: 0, //去购买
... ... @@ -7,33 +10,59 @@ const ACTION_TYPE = {
APPLYACTIVITY: 2 //去报名
};
var app = getApp()
Page({
data: {
undoneTicket: [{
headerTitle: '我的门票',
undoneTips: '您还没有购票哦',
buttonTips: '去购买',
isActivity: false,
actionType: ACTION_TYPE.GOBUY,
},
{
headerTitle: '我的门票',
undoneTips: '您还有未完成的门票订单',
buttonTips: '查看订单',
isActivity: false,
actionType: ACTION_TYPE.CHECKODER,
}],
cur_undoneTicket: {},
notJionActivity: {
headerTitle: '我的活动',
undoneTips: '您还没有报名活动哦',
buttonTips: '去报名',
isActivity: true,
actionType: ACTION_TYPE.APPLYACTIVITY,
}
},
noTicket: true,
noActivity: true,
array: [ { 'applyed': false, 'activityId': '123' }, { 'applyed': false, 'activityId': '456' }],
isLogin: false,
userInfo: {},
hasUnionID: '',
},
onLoad: function(options) {
//Do some initialize when page load.
let cur_undoneTicket = this.data.undoneTicket[0];
this.setData({
hasUnionID: app.globalData.WXUnion_ID !== null && app.globalData.WXUnion_ID !== '' && app.globalData.WXUnion_ID !== undefined ? true:false,
cur_undoneTicket
})
if (app.isLogin()) {
this.data.isLogin = true;
}else{
this.setData({
isLogin:false,
})
}
//订阅登录完成通知
listen(function (succeed) {
if (succeed) {
this.showUserInfo();
this.getInfoNum();
this.fetchInviteInfo();
}
}.bind(this))
},
onReady: function() {
//Do some when page ready.
... ... @@ -54,6 +83,12 @@ Page({
jumpToMiniapp({ app: 'yohobuy', page: 'myOrders', data: {index:0} })
},
jumpMoreActivity() {
wx.switchTab({
url: '/pages/schedule/schedule',
})
},
//按钮事件
tapButton(e) {
let actionType = e.detail;
... ... @@ -70,6 +105,183 @@ Page({
}
},
showUserInfo: function() {
// console.log("uid:", app.getUid())
if (app.getUid()) {
let param = {
method: "app.passport.profile",
uid: app.getUid()
}
GET(API_HOST, param)
.then((json) => {
if (json && json.code && json.code == 200) {
this.data.userInfo = app.globalData.userInfo;
this.data.userInfo.nickName = json.data.nickname;
this.data.userInfo.avatarUrl = (!json.data.head_ico ? "../../static/images/mine_default_head.png" : this.formatImgUrl(json.data.head_ico))
this.setData({
userInfo: this.data.userInfo,
isLogin:true
})
}else{
this.setData({
isLogin:false
})
}
})
.catch(error => {
// console.log(error);
this.setData({
isLogin: false
})
})
}
else {
let userInfo = app.globalData.userInfo;
this.setData({
userInfo
})
this.setData({
isLogin: false
})
}
},
getUserInfo: function (e) {
var that = this;
// console.log(e);
if (e.detail.errMsg === 'getUserInfo:ok'){
decodeUnionId(app.getWechatThirdSession(),e,function (response){
if (response.isHaveUnionID){
that.setData({
hasUnionID: true,
});
} else {
// console.log("没有获取到unionid");
}
});
} else {
openAuthorizeSettings(function (response) {
if (response.isHaveUnionID) {
that.setData({
hasUnionID: true,
})
};
if (response.succeed === true) {
that.showUserInfo();
} else {
// console.log("根据unionid没有查询到uid,需要再次点击授权getPhoneNumber")
}
});
}
},
getPhoneNumber: function (e) {
var app = getApp()
var that = this;
// console.log('getPhoneNumber',e);
if (e.detail.errMsg === 'getPhoneNumber:ok') {
decodePhoneNumber(e.detail.iv, e.detail.encryptedData, '',function (result) {
if (result.code != 200) {
// console.log('result.code',result.code);
that.wetoast.toast({
title: result.message,
titleClassName: 'wetoast-title',
duration: 1000,
success:function(){
that.loginAndRegisterTapped()
}.bind(that)
});
} else {
if (result.is_register){
that.showZanToast({ title: '欢迎加入Yoho!Family!新人礼包已发放到个人中心-优惠券,请注意查收',success:function(){
let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0;
app.updateUid(uid)
that.setData({ uid });
that.showUserInfo();
}},1500);
} else {
let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0;
app.updateUid(uid)
that.setData({ uid });
that.showUserInfo();
}
}
})
} else {
wx.navigateTo({
url: '../bindPhoneNumber/bindPhoneNumber',
})
}
},
loginAndRegisterTapped:function() {
// console.log("loginAndRegisterTapped");
let that = this;
let app = getApp()
if (wx.getSetting) {
wx.getSetting({
success: (res) => {
// console.log("userInfo:", res.authSetting["scope.userInfo"])
if (res.authSetting["scope.userInfo"] !== null && res.authSetting["scope.userInfo"] !== undefined && res.authSetting["scope.userInfo"] === false) {
wx.showModal({
title: '',
content: '检测到您未打开微信用户信息授权,开启后即可进行登录',
confirmText: "去开启",
confirmColor: "#000000",
success: function (res) {
if (res.confirm) {
wx.openSetting({
success: (res) => {
// console.log(res.authSetting["scope.userInfo"])
if (res.authSetting["scope.userInfo"] !== null && res.authSetting["scope.userInfo"] !== undefined && res.authSetting["scope.userInfo"] === true) {
getUnionID(app.getWechatThirdSession(), function (response) {
if (response.succeed === true) {
that.showUserInfo();
}
})
}
}
})
} else {
wx.navigateTo({
url: '../bindPhoneNumber/bindPhoneNumber',
})
}
}
})
} else {
wx.navigateTo({
url: '../bindPhoneNumber/bindPhoneNumber',
})
}
}
})
} else {
wx.showModal({
title: '提示',
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
})
}
},
updateUserInfo() {
if (app.isLogin()) {
// this.data.isLogin = true;
this.setData({
isLogin: true,
})
this.showUserInfo();
} else {
this.setData({
isLogin: false,
})
}
},
formatImgUrl: function(url) {
url = url.replace(new RegExp('{width}', 'gm'), '120').replace(new RegExp('{height}', 'gm'), '120').replace(new RegExp('{mode}', 'gm'), '1');
return url;
},
onHide: function() {
//Do some when page hide.
... ...
{
"navigationBarTitleText": "我的",
"usingComponents": {
"section-header" : "/components/user-center/section-header/index",
"undone-view": "/components/user-center/undone-view/index",
"ticket-slide": "/components/user-center/ticket-slide/index"
"ticket-slide": "/components/user-center/ticket-slide/index",
"schedule-item": "/components/schedule-item/index",
"login-button": "/components/login-button/login-button"
}
}
\ No newline at end of file
... ...
<view class="container">
<!-- 头部用户信息 -->
<block>
<image class="header-bg" src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2700915385,2771074487&fm=26&gp=0.jpg" mode="aspectFill">
<view class="user-info">
<image class="portrait" src="http://img3.imgtn.bdimg.com/it/u=3677209778,3519789803&fm=26&gp=0.jpg" mode="aspectFill"></image>
<view class="nick-name">不加糖的小饼干</view>
<view class="qrcode-view" bindtap="tapMyQRCode">
<image class="qrcode-icon" src="../../static/images/myQRcode@3x.png"></image>
<view class="qrcode-tips">我的二维码</view>
<view class="user-info">
<login-button
wx:if="{{!isLogin}}"
class="login-bg"
login-class="login-btn"
open-type="{{hasUnionID?'getPhoneNumber':'getUserInfo'}}"
bindgetphonenumber="getPhoneNumber"
bindgetuserinfo='getUserInfo'
bindupdateuserinfo="updateUserInfo">登录/注册
</login-button>
<block wx:else>
<image class="header-bg" src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2700915385,2771074487&fm=26&gp=0.jpg" mode="aspectFill">
<view class="user-info">
<image class="portrait" src="{{userInfo.avatarUrl}}" mode="aspectFill"></image>
<view class="nick-name">{{userInfo.nickName}}</view>
<view class="qrcode-view" bindtap="tapMyQRCode">
<image class="qrcode-icon" src="../../static/images/myQRcode@3x.png"></image>
<view class="qrcode-tips">我的二维码</view>
</view>
</view>
</view>
</image>
</block>
</image>
</block>
</view>
<!-- <undone-view undone-data="{{undoneTicket[1]}}" bind:jumpAllOrders="jumpAllOrders" bind:tapButton="tapButton"></undone-view> -->
<ticket-slide></ticket-slide>
<!-- 我的门票 -->
<section-header title="我的门票" more-title="全部订单" has-more="true" bind:tapMore="jumpAllOrders"></section-header>
<block wx:if="{{noTicket}}">
<undone-view undone-data="{{cur_undoneTicket}}" bind:jumpAllOrders="jumpAllOrders" bind:tapButton="tapButton"></undone-view>
</block>
<block wx:else>
<ticket-slide></ticket-slide>
</block>
<view class="space-view"></view>
<undone-view undone-data="{{notJionActivity}}" isActivity="true" bind:tapButton="tapButton"></undone-view>
<!-- 我的活动 -->
<section-header title="我的活动" more-title="更多活动" has-more="{{!noActivity}}" bind:tapMore="jumpMoreActivity"></section-header>
<block wx:if="{{noActivity}}">
<undone-view undone-data="{{notJionActivity}}" bind:tapButton="tapButton"></undone-view>
</block>
<block wx:else>
<scroll-view scroll-y>
<block wx:for="{{array}}" wx:key="index">
<schedule-item data="{{item}}"></schedule-item>
<view wx:if="{{index!=array.length-1}}" class="space-view40"></view>
</block>
<view class="end-space-view">
<view class="left-line"></view>
<view class="end">已结束</view>
<view class="right-line"></view>
</view>
<block wx:for="{{array}}" wx:key="index">
<schedule-item data="{{item}}"></schedule-item>
<view wx:if="{{index!=array.length-1}}" class="space-view40"></view>
</block>
</scroll-view>
</block>
</view>
\ No newline at end of file
</view>
<quickNavigation id="quickNavigation" isShowIndicator="{{isShowIndicator}}" isShowShopCart="{{true}}" isShowMenu="{{false}}" marginBottom="{{50}}" bind:backToTop="backToTop"></quickNavigation>
<import src="../../vendors/toast/wetoast.wxml" />
<template is="wetoast" data="{{...__wetoast__}}" />
<import src="../../vendors/zanui/toast/index.wxml"/>
<template is="zan-toast" data="{{zanToast}}"/>
\ No newline at end of file
... ...
... ... @@ -58,4 +58,40 @@
.space-view {
height: 20rpx;
background-color: #eeeeee;
}
.end-space-view {
width: 750rpx;
height: 40rpx;
margin-top: 40rpx;
margin-bottom: 60rpx;
display: flex;
align-items: center;
justify-content: center;
white-space: nowrap;
}
.left-line {
margin-left: 30rpx;
width: 286rpx;
height: 2rpx;
background-color: #E0E0E0;
}
.end {
font-family: PingFang-SC-Regular;
font-size: 28rpx;
color: #B0B0B0;
letter-spacing: 0;
text-align: justify;
margin-left: 20rpx;
margin-right: 20rpx;
white-space: nowrap;
}
.right-line{
margin-right: 30rpx;
width: 286rpx;
height: 2rpx;
background-color: #E0E0E0;
}
\ No newline at end of file
... ...
... ... @@ -22,7 +22,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.7.3",
"appid": "wx50c403477ed65141",
"appid": "wx084ab813d88c594b",
"projectname": "yoho-miniapp-yohood",
"debugOptions": {
"hidedInDevtools": []
... ...