[最新代码]
@@ -4,7 +4,10 @@ import {updToken} from './updateToken'
|
||||
// 请求方式配置
|
||||
// https://lifetest.ysd-bs.com //测试地址
|
||||
// https://card.ysd-bs.com
|
||||
const api = "https://lifetest.ysd-bs.com/api/" //正式地址
|
||||
|
||||
// wx8e424dbdc443381f 测试appid
|
||||
// wxb2e3e8091d9feac3 正式appid
|
||||
const api = "https://card.ysd-bs.com/api/" //正式地址
|
||||
const header = {
|
||||
"Accept" : "application/json"
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ Page({
|
||||
},
|
||||
|
||||
onShow() {
|
||||
console.log(this.data.screenChannel)
|
||||
// 获取账变记录
|
||||
this.accountInfo();
|
||||
},
|
||||
|
||||
@@ -33,7 +33,6 @@ Page({
|
||||
*/
|
||||
frozenInfo() {
|
||||
wx.$api.user.ungrants(this.data.type).then(res=>{
|
||||
console.log(res)
|
||||
this.setData({
|
||||
frozenData: res.data
|
||||
})
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<view class="grantTop">
|
||||
<image class="grantTop-img" src="/static/img/frozen_back.png" mode="scaleToFill"></image>
|
||||
<view class="grantTop-text">
|
||||
<image src="/static/img/frozen_identity_00.png"></image>
|
||||
<image src="{{type == 'silver' ? '/static/img/frozen_identity_00.png' : '/static/img/frozen_identity_01.png'}}"></image>
|
||||
<view class="grantTop-price">
|
||||
<text>待发放(额度)</text>
|
||||
<view class="grantTop-price-tips">¥</view>{{item.ungrant}}
|
||||
@@ -57,32 +57,42 @@
|
||||
<view class="grantIssue-title-name">
|
||||
<image src="/static/img/frozen_icon.png"></image><text>消费红包分期发放</text>
|
||||
</view>
|
||||
<view class="grantIssue-title-tips">应发余额<text>¥{{item.variable}}</text>,发放期数<text> {{item.num}}
|
||||
</text>期,每期发放<text>¥{{item.avg}}/期</text></view>
|
||||
<view class="grantIssue-title-tips">
|
||||
应发余额<text>¥{{item.variable}}</text>,发放期数<text>{{item.num}}</text>期,每期发放<text>¥{{item.avg}}/期</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grantIssue-list">
|
||||
<view class="grantIssue-label" wx:for="{{item.items}}" wx:for-item="listItem" wx:key="items">
|
||||
<image class="grantIssue-label-img {{listItem.status == 0 ? 'active' : ''}}"
|
||||
src="/static/img/frozen_img.png" mode="scaleToFill"></image>
|
||||
<view class="grantIssue-label-cont">
|
||||
<view class="grantIssue-label-left">
|
||||
<view class="grantIssue-left-top {{listItem.status == 0 ? 'active' : ''}}">
|
||||
第<text>{{listItem.num}}</text>期</view>
|
||||
<view class="grantIssue-left-number {{listItem.status == 0 ? 'active' : ''}}">
|
||||
共<text>{{item.items.length}}</text>期</view>
|
||||
</view>
|
||||
<view class="grantIssue-label-center">
|
||||
<view class="grantIssue-center-top {{listItem.status == 0 ? 'active' : ''}}">
|
||||
<text>{{listItem.variable}}</text>( 发放额度 )</view>
|
||||
<view class="grantIssue-center-time">发放时间:{{listItem.start_at}}</view>
|
||||
</view>
|
||||
<view class="grantIssue-label-right {{listItem.status == 0 ? 'active' : ''}}">
|
||||
{{listItem.status_text}}
|
||||
<block wx:if="{{item.items.length > 0}}">
|
||||
<view class="grantIssue-label" wx:for="{{item.items}}" wx:for-item="listItem"
|
||||
wx:key="items">
|
||||
<image class="grantIssue-label-img {{listItem.status == 0 ? 'active' : ''}}"
|
||||
src="/static/img/frozen_img.png" mode="scaleToFill"></image>
|
||||
<view class="grantIssue-label-cont">
|
||||
<view class="grantIssue-label-left">
|
||||
<view class="grantIssue-left-top {{listItem.status == 0 ? 'active' : ''}}">
|
||||
第<text>{{listItem.num}}</text>期</view>
|
||||
<view class="grantIssue-left-number {{listItem.status == 0 ? 'active' : ''}}">
|
||||
共<text>{{item.items.length}}</text>期</view>
|
||||
</view>
|
||||
<view class="grantIssue-label-center">
|
||||
<view class="grantIssue-center-top {{listItem.status == 0 ? 'active' : ''}}">
|
||||
<text>{{listItem.variable}}</text>( 发放额度 )
|
||||
</view>
|
||||
<view class="grantIssue-center-time">发放时间:{{listItem.start_at}}</view>
|
||||
</view>
|
||||
<view class="grantIssue-label-right {{listItem.status == 0 ? 'active' : ''}}">
|
||||
{{listItem.status_text}}
|
||||
</view>
|
||||
</view>
|
||||
<image class="grantIssue-label-tips {{listItem.status == 0 ? 'active' : ''}}"
|
||||
src="/static/img/frozen_btn.png" mode="scaleToFill">
|
||||
</image>
|
||||
</view>
|
||||
<image class="grantIssue-label-tips {{listItem.status == 0 ? 'active' : ''}}"
|
||||
src="/static/img/frozen_btn.png" mode="scaleToFill">
|
||||
</image>
|
||||
</block>
|
||||
<!-- 暂无内容 -->
|
||||
<view class="grantIssue-pack" wx:else>
|
||||
<image src="/static/img/Account_icon_tips.png"></image>
|
||||
<view>抱歉,目前发放期数~</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -109,6 +119,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 暂无内容 -->
|
||||
<view class="pack-center pages-hint" wx:else>
|
||||
<view class="no-pack-center pack-center pages-hint" wx:else>
|
||||
<image src="/static/img/Account_icon.png"></image>
|
||||
<view>抱歉,目前暂无内容~</view>
|
||||
</view>
|
||||
@@ -103,11 +103,11 @@
|
||||
|
||||
/* 最新样式 2021-06-22 */
|
||||
page,
|
||||
.pack-center {
|
||||
.no-pack-center {
|
||||
background-image: linear-gradient(to bottom, #24315d, #24315d);
|
||||
}
|
||||
|
||||
.pack-center {
|
||||
.no-pack-center {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -480,5 +480,21 @@ page,
|
||||
.dots .active {
|
||||
width: 24rpx;
|
||||
border-radius: 40rpx;
|
||||
background-color: #b13509;
|
||||
background-color: #ffdf95;
|
||||
}
|
||||
|
||||
.grantIssue-pack {
|
||||
background: rgba(0, 0, 0, .2);
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
padding: 40rpx 0;
|
||||
color: #c9d3f7;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.grantIssue-pack image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
@@ -26,6 +26,7 @@ Page({
|
||||
isUser : false, //用户登录状态
|
||||
noticeData : '', //首页公告
|
||||
loading : true, //骨架屏加载
|
||||
subState : '', //订阅状态
|
||||
address : {
|
||||
city: "", //市
|
||||
area: "", //区
|
||||
@@ -70,13 +71,13 @@ Page({
|
||||
indexInfo() {
|
||||
if(this.data.stateType == 'shaky') {
|
||||
wx.$api.index.index(this.data.city, this.data.longitude, this.data.latitude).then(res=>{
|
||||
console.log(res.data.adverts)
|
||||
this.setData({
|
||||
adverts : res.data.adverts,
|
||||
cardArr : res.data.rights,
|
||||
activities : res.data.activities,
|
||||
noticeData : res.data.notice,
|
||||
loading : false,
|
||||
subState :res.data.welfare_subscribe,
|
||||
address : {
|
||||
city: res.data.location.city_name,
|
||||
area: res.data.location.district_name || "",
|
||||
@@ -96,7 +97,6 @@ Page({
|
||||
})
|
||||
} else {
|
||||
wx.$api.index.choice(this.data.stateType,this.data.city, this.data.longitude, this.data.latitude).then(res=>{
|
||||
console.log(res.data.adverts)
|
||||
this.setData({
|
||||
adverts : res.data.adverts,
|
||||
cardArr : res.data.categorys,
|
||||
@@ -171,7 +171,6 @@ Page({
|
||||
* 点击轮播图片
|
||||
*/
|
||||
clickImg(e) {
|
||||
console.log(e.currentTarget.dataset)
|
||||
let newChannel = e.currentTarget.dataset.channel,
|
||||
newImg = e.currentTarget.dataset.img,
|
||||
newUrl = e.currentTarget.dataset.url
|
||||
@@ -325,8 +324,15 @@ Page({
|
||||
* 订阅
|
||||
*/
|
||||
subscribeTap() {
|
||||
if(!this.data.isUser) {
|
||||
// 去登录
|
||||
wx.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['g8cEL-Tf2_Pdh8VyBdsYbhv09VVm8om-ZblhXIaVDiY'],
|
||||
tmplIds: ['6SJqWbasj42O_d7yET1s5G1eg62Z4SS3pByBeuXekSo'],
|
||||
success: res=> {
|
||||
if(res.errMsg == "requestSubscribeMessage:ok") {
|
||||
wx.$api.index.subscribe(1).then(res=>{
|
||||
@@ -334,9 +340,14 @@ Page({
|
||||
title: res.data,
|
||||
icon : 'none',
|
||||
})
|
||||
|
||||
// 获取卡权益
|
||||
this.indexInfo();
|
||||
|
||||
setTimeout(function () {
|
||||
wx.hideLoading();
|
||||
}, 1000)
|
||||
|
||||
}).catch(err=>{
|
||||
|
||||
})
|
||||
|
||||
@@ -86,7 +86,6 @@
|
||||
<image class="welfare_stra" src="../../static/img/welfare_stra.png"></image>
|
||||
<image class="welfare-title" src="../../static/img/welfare_title.png"></image>
|
||||
</view>
|
||||
<view class="subscribe" bindtap="subscribeTap">点击消息提醒</view>
|
||||
<view class="WelfareTitle"><text>{{ activities.length }}</text> 大会员权益,福利全线升级</view>
|
||||
<view class="WelfareList" bindtap="Snapup" wx:for="{{activities}}" wx:key="activities"
|
||||
data-text="{{item.code_text}}" data-can="{{item.canBuy}}" data-id="{{item.welfare_id}}"
|
||||
@@ -114,6 +113,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="subscribe" bindtap="subscribeTap" wx:if="{{!subState}}">
|
||||
<view class="subscribe-icon">
|
||||
<image class="subscribe-icon-one" src="/static/img/finger_00.png"></image>
|
||||
<image class="subscribe-icon-two" src="/static/img/finger_01.png"></image>
|
||||
</view>
|
||||
<view class="subscribe-cont"><text>点击消息提醒</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -573,5 +573,116 @@ page {
|
||||
|
||||
/* 订阅消息 */
|
||||
.subscribe {
|
||||
color: #fff;
|
||||
}
|
||||
color: #89663f;
|
||||
width: 100%;
|
||||
padding: 0 100rpx;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
margin-top: 50rpx;
|
||||
display: flex;
|
||||
/* -webkit-animation: Tada 3s both infinite;
|
||||
-moz-animation: Tada 3s both infinite;
|
||||
-ms-animation: Tada 3s both infinite;
|
||||
animation: Tada 3s both infinite; */
|
||||
}
|
||||
|
||||
.subscribe-icon,
|
||||
.subscribe-cont {
|
||||
height: 80rpx;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.subscribe-icon {
|
||||
width: 150rpx;
|
||||
padding-left: 30rpx;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(to right, #f3c988, #f9e0b8);
|
||||
border-radius: 40rpx 0 0 40rpx;
|
||||
}
|
||||
|
||||
.subscribe-icon::after{
|
||||
position: absolute;
|
||||
content: '';
|
||||
right: -50rpx;
|
||||
top: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-bottom: 80rpx solid #f9e0b8;
|
||||
border-right: 50rpx solid transparent;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.subscribe-cont {
|
||||
width: calc(100% - 150rpx);
|
||||
background: linear-gradient(to right, #f3c988, #f9e0b8);
|
||||
border-radius: 0 40rpx 40rpx 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.subscribe-cont text {
|
||||
display: inline-block;
|
||||
-webkit-animation: subscribeCont 1s linear infinite;
|
||||
animation: subscribeCont 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes subscribeCont {
|
||||
25% {transform: scale(.98);}
|
||||
50%, 100% {transform: scale(1);}
|
||||
75% {transform: scale(1.05);}
|
||||
}
|
||||
|
||||
.subscribe-icon image {
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
|
||||
@keyframes Tada {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
transform: scale(1)
|
||||
}
|
||||
|
||||
70%,73%{
|
||||
transform: scale(1) rotate(-3deg);
|
||||
transform: scale(1) rotate(-3deg)
|
||||
}
|
||||
|
||||
77%,83%,90%,97% {
|
||||
transform: scale(1) rotate(3deg);
|
||||
transform: scale(1) rotate(3deg)
|
||||
}
|
||||
|
||||
80%,87%,93%{
|
||||
transform: scale(1) rotate(-3deg);
|
||||
transform: scale(1) rotate(-3deg)
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1) rotate(0);
|
||||
transform: scale(1) rotate(0)
|
||||
}
|
||||
}
|
||||
|
||||
.subscribe-icon-one {
|
||||
-webkit-animation: bounce-right 1s linear infinite;
|
||||
animation: bounce-right 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes bounce-right {
|
||||
25% {transform: translateX(-3px);}
|
||||
50%, 100% {transform: translateX(0);}
|
||||
75% {transform: translateX(3px);}
|
||||
}
|
||||
|
||||
.subscribe-icon-two {
|
||||
-webkit-animation: bounce-two 1s linear infinite;
|
||||
animation: bounce-two 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes bounce-two {
|
||||
25% {opacity: 0;transform: translateX(-3px);}
|
||||
75% {opacity: 1;transform: translateX(3px);}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
console.log(options)
|
||||
this.setData({
|
||||
businessId: options.business_id
|
||||
})
|
||||
|
||||
@@ -160,6 +160,10 @@
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.userCard-parice text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.userCard-arrow-left, .userCard-arrow-right {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
|
||||
@@ -12,7 +12,6 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
console.log(options.url)
|
||||
this.setData({
|
||||
url : decodeURIComponent(options.url)
|
||||
})
|
||||
|
||||
@@ -23,14 +23,13 @@
|
||||
"compileHotReLoad": false,
|
||||
"useMultiFrameRuntime": true,
|
||||
"useApiHook": true,
|
||||
"useApiHostProcess": true,
|
||||
"useApiHostProcess": false,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"enableEngineNative": false,
|
||||
"bundle": false,
|
||||
"useIsolateContext": true,
|
||||
"useCompilerModule": true,
|
||||
"userConfirmedUseCompilerModuleSwitch": false,
|
||||
@@ -41,7 +40,7 @@
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.12.1",
|
||||
"appid": "wx8e424dbdc443381f",
|
||||
"appid": "wxb2e3e8091d9feac3",
|
||||
"projectname": "%E4%BA%BF%E6%97%B6%E4%BB%A3%EF%BC%88%E6%B5%8B%E8%AF%95%EF%BC%89",
|
||||
"debugOptions": {
|
||||
"hidedInDevtools": []
|
||||
|
||||
BIN
static/img/Account_icon.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
static/img/Account_icon_tips.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
static/img/finger_00.png
Normal file
|
After Width: | Height: | Size: 390 B |
BIN
static/img/finger_01.png
Normal file
|
After Width: | Height: | Size: 378 B |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 782 B |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 746 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 635 B |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 794 B |
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 282 KiB |