Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
20446ea0ee
4 changed files with 22 additions and 20 deletions
  1. 2
      app.js
  2. 2
      pages/agent/factory/index.js
  3. 21
      pages/ztbvip/index.js
  4. 17
      pages/ztbvip/index.wxml

2
app.js

@ -2,7 +2,7 @@
const tdsdk = require('./libs/tdweapp.js')
App({
//----------------------------------------------globalData--------------------------------------
evn: 2,//0:开发环境,1:测试环境,2:生产环境
evn: 0,//0:开发环境,1:测试环境,2:生产环境
tmplIds: ['SUjEgwDopCv9xkkSZ4KbS0L7XbAiVQor6GmPg14K760'],
agentMsgIds: ['kG8DErWDpyzBHCFaLlSKYMF7xVy8UpgogCwV_WSNt10', 'lOQ8Gvyy_dTk68bYGpRVnVA0M7DsYYrV81Gd39GUPBA'],
version: 152,

2
pages/agent/factory/index.js

@ -57,7 +57,7 @@ Page({
if (result.data.paperCategoryList && result.data.paperCategoryList.length) {
this.data.cateId = result.data.paperCategoryList[this.data.cateIndex].categoryId
}
if(result.data && result.data.isCooperate !== 1 && !app.globalData.userInfo.isVIP){
if(result.data && result.data.isCooperate === 1 && !app.globalData.userInfo.isVIP){
this.data.visible = true
}
this.setData({ factoryDetail: result.data, hasFollowed:result.data.hasFollowed, visible: this.data.visible })

21
pages/ztbvip/index.js

@ -1,4 +1,4 @@
import { getBaseInfo, getMemberExpenseList, getMemberInfo, buyMemberInfo } from "../../api/ztb"
import { getMemberExpenseList, getMemberInfo, buyMemberInfo } from "../../api/ztb"
const util = require('../../utils/util')
const event = require('../../utils/event.js')
const app = getApp()
@ -9,6 +9,7 @@ Page({
*/
data: {
userInfo: null,
userName: null,
avatarUrl: '../../assets/image/ygImg.png',
iconList: [],
safeBottom: app.globalData.safeBottom,
@ -30,15 +31,17 @@ Page({
return
}
wx.showLoading({ title: '处理中', mask: true })
getBaseInfo().then(result => {
this.setData({
avatarUrl: util.isEmpty(app.globalData.userInfo.avatarUrl) ? '/assets/image/ygImg.png' : app.globalData.userInfo.avatarUrl,
userInfo: app.globalData.userInfo,
userName: util.isEmpty(app.globalData.userInfo.userName) ? '' : app.globalData.userInfo.userName.substring(0, 14)
})
}).catch(err => { })
getMemberInfo().then(res => {
this.setData({ vipInfo: res.data, ['vipInfo.memberExpiredAt']: res.data.memberExpiredAt.substring(0, 10) })
var nickname = ''
if (app.globalData.userInfo.isAuth) {
nickname = app.globalData.userInfo.realName.substring(0, 14)
} else if(!util.isEmpty(app.globalData.userInfo.nickname)) {
nickname =app.globalData.userInfo.nickname.substring(0, 14)
} else if(!util.isEmpty(app.globalData.userInfo.realName)) {
nickname = app.globalData.userInfo.realName.substring(0, 14)
}
var avatarUrl = util.isEmpty(app.globalData.userInfo.avatarUrl) ? '/assets/image/ygImg.png' : app.globalData.userInfo.avatarUrl
this.setData({ vipInfo: res.data, avatarUrl, userInfo: app.globalData.userInfo, userName: nickname })
wx.hideLoading()
}).catch(err => {
wx.hideLoading()

17
pages/ztbvip/index.wxml

@ -13,11 +13,11 @@
<view style="margin-left:18rpx;align-items:flex-start;margin-top: 16rpx;">
<view class="flex" style="font-size:12px" catchtap="toAuthor">
<view class="text-cut text-xl" style="color: {{vipInfo.isVIP==1 ? '#7E561C' : 'white'}};">{{userName || '未登录'}}</view>
<view class="flex flex-justify" wx:if="{{userInfo}}">
<!-- <view class="flex flex-justify" wx:if="{{userInfo}}">
<image class="img-auth2" src="{{userInfo.isAuth == 1 ? '../../assets/image/icon_author.png' : '../../assets/image/icon_unauthor.png'}}"></image>
<text class="{{userInfo.isAuth == 1 ? 'text-blue' : 'text-gray'}}">{{userInfo.isAuth == 1 ? '已认证' : '未实名认证'}}</text>
<text class="text-yellow" style="padding:4px;" wx:if="{{userInfo && userInfo.isAuth != 1}}">去认证</text>
</view>
</view> -->
</view>
<view style="color: {{vipInfo.isVIP==1 ? '#7E561C' : 'white'}};margin-top: 12rpx;" wx:if="{{userInfo}}">{{userInfo.mobile}}</view>
<view class="text-sm text-white" style="margin-top: 12rpx" wx:else>登录解锁会员权益</view>
@ -32,27 +32,26 @@
</view>
<view class="text-bold bg-white" style="font-size:32rpx;color:#333333;padding:12rpx 12rpx 24rpx 32rpx;">选择购买的会员产品</view>
<scroll-view class="bg-white" scroll-x="{{true}}" style="width: 750rpx;height: 300rpx;">
<scroll-view class="bg-white" scroll-x="{{true}}" style="width: 750rpx;height: 320rpx;">
<view style="display:flex;align-items: center;width: 750rpx;">
<view style="min-width: 208rpx;margin-left: 32rpx;height: 270rpx;" wx:for="{{iconList}}" wx:key="index" data-index="{{index}}" bindtap="onGridTap">
<view style="min-width: 208rpx;margin-left: 32rpx;height: 280rpx;" wx:for="{{iconList}}" wx:key="index" data-index="{{index}}" bindtap="onGridTap">
<view class="{{item.id == divIndex? 'openVip22':'openVip21'}}" style="position: relative;margin-top: 24rpx;">
<view style="padding:32rpx 0rpx 48rpx 0rpx;text-align: center">
<view class="text-cut" style="font-size:36rpx;color:#333333">{{item.days}}{{item.title}}</view>
<view class="text-price" style="margin-top:18rpx;font-size:40rpx;color:#d0a45c">{{item.realPrice}}</view>
<view style="margin-top:18rpx;font-size:24rpx;color:#999999;text-decoration:line-through">原价:¥{{item.bidPrice}}</view>
<view class="text-price" style="margin-top:16rpx;font-size:40rpx;color:#d0a45c">{{item.realPrice}}</view>
<view style="margin-top:16rpx;font-size:24rpx;color:#999999;text-decoration:line-through">原价:¥{{item.bidPrice}}</view>
<view style="height: 16rpx;"></view>
<text style="background: #F2F1F4;border-radius: 8rpx;padding: 4rpx 8rpx;font-size: 20rpx;">每天仅需4.2元</text>
<text style="background: #F2F1F4;border-radius: 8rpx;padding: 4rpx 8rpx;font-size: 20rpx;">{{item.description}}</text>
</view>
<image class="cu-checked" src="/assets/vip/vip-checked.png" wx:if="{{item.id == divIndex}}"></image>
<view class="cu-tags" wx:if="{{item.sellStrategy === 'twoForOneAtFirstTime'}}">首月买一赠一</view>
</view>
</view>
<view style="min-width: 32rpx;height: 270rpx;"><text></text></view>
</view>
</scroll-view>
<view class="text-bold bg-white" style="font-size:32rpx;color:#333333;padding: 24rpx 12rpx 12rpx 24rpx;">会员特权</view>
<view class="text-bold bg-white" style="font-size:32rpx;color:#333333;padding: 12rpx 4rpx 12rpx 32rpx;">会员特权</view>
<wux-grids col="4" square bordered="{{ false }}">
<wux-grid hover-class="none">
<image style="height: 112rpx;width: 112rpx;margin-top: 18rpx;" src="/assets/vip/icon-vip1.png"></image>

Loading…
Cancel
Save