Merge pull request '添加登录' (#1) from hat into master

Reviewed-on: https://git.oa00.com/SWS/EXEEED/pulls/1
master
Tuisku 3 years ago
commit b7af5872a1

@ -63,7 +63,9 @@
"l-mas": "/miniprogram_npm/lin-ui/mask/index",
"l-list": "/miniprogram_npm/lin-ui/list/index",
"l-water-flow": "/miniprogram_npm/lin-ui/water-flow/index",
"s-spu-preview": "/components/spu-preview/index"
"s-spu-preview": "/components/spu-preview/index",
"l-arc-popup": "/miniprogram_npm/lin-ui/arc-popup/index",
"l-dialog": "/miniprogram_npm/lin-ui/dialog/index"
},
"style": "v2",
"sitemapLocation": "sitemap.json"

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

@ -2,7 +2,7 @@
<view class="main">
<!-- 搜索栏 -->
<view class="search">
<l-search-bar class="search" placeholder="搜索" show-cancel="{{false}}" />
<l-search-bar bg-color="#F9F9F9" class="search" placeholder="搜索" show-cancel="{{false}}" />
</view>
<!-- 导航栏 -->
<view class="wrap">

@ -178,11 +178,6 @@ Page({
selectedItem
})
},
to (e) {
wx.navigateTo({
url: e.currentTarget.dataset.url,
})
},
/**
* 生命周期函数--监听页面加载
*/

@ -2,7 +2,7 @@
<view class="main">
<!-- 搜索栏 -->
<view class="search">
<l-search-bar class="search" placeholder="搜索" show-cancel="{{false}}" />
<l-search-bar bg-color="#F9F9F9" class="search" placeholder="搜索" show-cancel="{{false}}" />
</view>
<!-- 导航栏 -->
<view class="wrap">
@ -24,7 +24,9 @@
<view class="card_top">今天</view>
<view class="cards">
<view class="card" data-url="/pages/lookup/loockvideo/video" bindtap="to">
<!-- 封面图片 -->
<image style="width: 144rpx;height: 144rpx;border-radius: 8rpx;" src="../../../quest/subpage/detail/image/short/img_xtuone@2x.png"></image>
<!-- 左下角播放时长 -->
<view class="time">
<image style="width: 16rpx;height: 18rpx;margin-right: 5rpx;" src="/images/img_bofang@2x.png"></image>03:32
</view>

@ -2,7 +2,7 @@
<view class="main">
<!-- 搜索栏 -->
<view class="search">
<l-search-bar class="search" placeholder="搜索" show-cancel="{{false}}" />
<l-search-bar bg-color="#F9F9F9" class="search" placeholder="搜索" show-cancel="{{false}}" />
</view>
<!-- 导航栏 -->
<view class="wrap">

@ -8,7 +8,7 @@
align-items: center;
z-index: 999;
position: sticky;
top: 0;
top: 0rpx;
}
.wrap {

@ -11,13 +11,34 @@ Component({
* 组件的初始数据
*/
data: {
form: {
name: '',
tel: '',
add: [],
type: '',
tip: ''
}
},
/**
* 组件的方法列表
*/
methods: {
blur(e) {
console.log(e)
let a = "form." + e.currentTarget.dataset.mes
let b = e.detail.value
this.setData({
[a]: b
})
console.log(this.data)
},
getUserProvince(e) {
console.log(e.detail.value)
console.log(this.data)
this.setData({
[form.add]: e.detail.value
})
},
}
})
})

@ -4,22 +4,27 @@
<image style="width: 48rpx;height: 48rpx;margin-right: 16rpx;" src="../../image/ic_xingming@2x.png"></image>
姓名<text style="color: red;">*</text>
</view>
<view class="placeholder">输入姓名
</view>
<input class="placeholder" placeholder="输入姓名" bindblur="blur" data-mes="name"></input>
<view class="hr"></view>
<view class="title">
<image style="width: 48rpx;height: 48rpx;margin-right: 16rpx;" src="../../image/ic_sjh@2x.png"></image>
手机号<text style="color: red;">*</text>
</view>
<view class="placeholder">输入手机号
</view>
<input class="placeholder" placeholder="输入手机号" bindblur="blur" data-mes="tel"></input>
<!-- <view class="placeholder">输入手机号 -->
<!-- </view> -->
<view class="hr"></view>
<view class="title">
<image style="width: 48rpx;height: 48rpx;margin-right: 16rpx;" src="../../image/ic_dq@2x.png"></image>
地区<text style="color: red;">*</text>
</view>
<view class="placeholder">选择地区
<!-- <input class="placeholder" placeholder="输入姓名" bindblur="blur" data-mes="name"></input> -->
<picker mode="region" bindchange="getUserProvince">
<view class="placeholder">
<text wx:if="{{form.add}}">{{form.add}}</text>
<text wx:else="{{form}}">请选择地区</text>
</view>
</picker>
<view class="hr"></view>
<view class="title">
<image style="width: 48rpx;height: 48rpx;margin-right: 16rpx;" src="../../image/ic_gzcx@2x.png"></image>
@ -32,10 +37,11 @@
<image style="width: 48rpx;height: 48rpx;margin-right: 16rpx;" src="../../image/ic_bz@2x.png"></image>
备注
</view>
<view class="placeholder" style="height: 180rpx;">请输入备注信息
</view>
<textarea class="placeholder" placeholder="输入备注信息" bindblur="blur" data-mes="name" auto-height></textarea>
<!-- <view class="placeholder" style="height: 180rpx;">请输入备注信息 -->
<!-- </view> -->
</view>
<!-- 底部按钮 -->
<view class="bot">
<view class="button">接受任务</view>
<view class="button">上传</view>
</view>

@ -18,25 +18,25 @@
margin-bottom: 24rpx;
}
.placeholder{
height: 96rpx;
background: #F9F9F9;
border-radius: 8rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 28rpx;
display: flex;
align-items: center;
padding-left: 32rpx;
.placeholder {
width: 558rpx;
height: 32rpx;
background: #F9F9F9;
border-radius: 8rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
/* color: #999999; */
padding: 32rpx;
}
.hr{
.hr {
width: 622rpx;
height: 1rpx;
background: #E8E8E8;
margin: 32rpx 0rpx;
height: 1rpx;
background: #E8E8E8;
margin: 32rpx 0rpx;
}
.bot {
background-color: white;
height: 98rpx;
@ -62,4 +62,4 @@ margin: 32rpx 0rpx;
display: flex;
justify-content: center;
align-items: center;
}
}

@ -4,20 +4,28 @@ Component({
* 组件的属性列表
*/
properties: {
table: {
type: Array,
value: [{
one: '传播值',
tow: '奖励积分'
}]
}
},
/**
* 组件的初始数据
*/
data: {
// table: String
},
/**
* 组件的方法列表
*/
methods: {
lo(str) {
console.log(str)
}
}
})
})

@ -1,6 +1,10 @@
<!--pages/quest/subpage/detail/components/detailed/detailed.wxml-->
<!-- 展示 -->
<view class="main">
<view class="status">
<view>进行中</view>
<view class="status_tip">任务进行中,如已发布视频请上传链接</view>
</view>
<view class="main_title">星途揽月新款抖音视频宣传推广视频图文需求</view>
<view class="main_text">4月8日凌云S上市抖音上市传播需求从外观性能和参数等多角度来切入完成对该车辆的推广宣传效果。</view>
<view class="main_line"></view>
@ -20,9 +24,9 @@
<view class="main">
<view class="main_title" style="justify-content: space-between;display: flex;align-items: center;">
任务素材
<view class="more">
<!-- <view class="more">
更多相关素材 >
</view>
</view> -->
</view>
<view class="image">
<image class="img" style="margin-right: 24rpx;" src="../../image/short/img_xtuone@2x.png"></image>
@ -47,27 +51,13 @@
奖励规则
</view>
<view class="table">
<view style="height: 96rpx;border-radius: 8rpx;background: #F5FAFF;font-size: 24rpx;font-family: PingFangSC-Semibold, PingFang SC;font-weight: 600;color: #333333;line-height: 24rpx;display: flex;align-items: center;justify-content: space-around;">
<view>传播值</view>
<view>奖励积分</view>
</view>
<view style="height: 96rpx;border-radius: 8rpx;background: #FFFFFF;font-size: 24rpx;font-family: PingFangSC-Semibold, PingFang SC;font-weight: 600;color: #333333;line-height: 24rpx;display: flex;align-items: center;justify-content: space-around;">
<view>0-1000</view>
<view>200</view>
</view>
<view style="height: 96rpx;border-radius: 8rpx;background: #F5FAFF;font-size: 24rpx;font-family: PingFangSC-Semibold, PingFang SC;font-weight: 600;color: #333333;line-height: 24rpx;display: flex;align-items: center;justify-content: space-around;">
<view>1000~5000</view>
<view>300</view>
</view>
<view style="height: 96rpx;border-radius: 8rpx;background: #FFFFFF;font-size: 24rpx;font-family: PingFangSC-Semibold, PingFang SC;font-weight: 600;color: #333333;line-height: 24rpx;display: flex;align-items: center;justify-content: space-around;">
<view>5000~10000</view>
<view>500</view>
</view>
<view style="height: 96rpx;border-radius: 8rpx;background: #F5FAFF;font-size: 24rpx;font-family: PingFangSC-Semibold, PingFang SC;font-weight: 600;color: #333333;line-height: 24rpx;display: flex;align-items: center;justify-content: space-around;">
<view>10000以上</view>
<view>1000</view>
<view class="cells">
<view class="cell {{index === 0 ? 'cell_top' : 'cell_mes'}}" wx:for="{{table}}" wx:key="index" style="background-color: {{index%2 === 0 ? '#F5FAFF' : 'white'}};">{{item.one}}</view>
</view>
<view class="lin"></view>
<view>
<view class="cell {{index === 0 ? 'cell_top' : 'cell_mes'}}" wx:for="{{table}}" wx:key="index" style="background-color: {{index%2 === 0 ? '#F5FAFF' : 'white'}};">{{item.two}}</view>
</view>
</view>
</view>
<!-- 底部按钮 -->

@ -8,6 +8,30 @@
margin-bottom: 16rpx;
}
.status {
width: 558rpx;
height: 72rpx;
padding: 32rpx;
background: #F5F9FF;
border-radius: 8rpx;
border: 2rpx solid #BAD7FF;
font-size: 32rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #006BFF;
line-height: 32rpx;
margin-bottom: 32rpx;
}
.status_tip {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 24rpx;
margin-top: 16rpx;
}
.main_title {
font-size: 36rpx;
font-family: PingFangSC-Semibold, PingFang SC;
@ -57,14 +81,14 @@
margin-bottom: 24rpx;
}
.more {
/* .more {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #006BFF;
line-height: 24rpx;
display: inline;
}
} */
.image {
display: flex;
@ -81,19 +105,45 @@
.table {
width: 624rpx;
height: 480rpx;
border-radius: 8px;
border: 2rpx solid #D8EBFF;
margin-bottom: 80rpx;
display: flex;
overflow: hidden;
}
.cells {
border-radius: 8rpx;
}
.cell {
width: 311rpx;
height: 96rpx;
display: flex;
justify-content: center;
align-items: center;
}
.lin {
width: 2rpx;
height: 480rpx;
background: #D8EBFF;
position: absolute;
top: 1712rpx;
left: 373rpx;
z-index: 999;
}
.cell_top {
font-size: 24rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
line-height: 24rpx;
}
.cell_mes {
font-size: 24rpx;
font-family: MiSans-Normal, MiSans;
font-weight: 400;
color: #333333;
line-height: 24rpx;
}
.bot {

@ -11,13 +11,50 @@ Component({
* 组件的初始数据
*/
data: {
platforms: [
{
id: 1,
name: '抖音'
},{
id: 2,
name: '快手'
},{
id: 3,
name: '朋友圈'
},{
id: 4,
name: '视频号'
}
],
platform: null,
platformdia: false,
link: ''
},
/**
* 组件的方法列表
*/
methods: {
plachoose(e){
this.setData({
platformdia: true
})
},
plachoose2(e){
console.log(e.currentTarget.dataset.mes)
this.setData({
platform: e.currentTarget.dataset.mes,
platformdia: false
})
},
linkin(e){
console.log(e.detail.value)
this.setData({
link: e.detail.value
})
},
up(e){
console.log(this.data.platform,this.data.link)
}
}
})

@ -4,18 +4,20 @@
<image style="width: 48rpx;height: 48rpx;margin-right: 16rpx;" src="../../image/ic_xzpt@2x.png"></image>
选择平台
</view>
<view class="platform">抖音
<view class="platform" bindtap="plachoose">{{platform ? platform.name:'请选择平台'}}
<l-icon name="right" color="#999999" size="24"></l-icon>
</view>
<view class="title">
<image style="width: 48rpx;height: 48rpx;margin-right: 16rpx;" src="../../image/img_srlj@2x.png"></image>
输入链接
</view>
<view class="link">
<!-- <view class="link">
输入链接
</view>
<view class="but">上传</view>
</view> -->
<textarea class="link" placeholder="输入链接" maxlength="500" bindblur="linkin" auto-height></textarea>
<view class="but" bindtap="up">上传</view>
</view>
<!-- 上传记录 -->
<view class="main">
<view class="record">上传记录</view>
<view class="record_list">
@ -32,4 +34,11 @@
<view class="link_time">2022-05-17 12:00:00</view>
</view>
</view>
</view>
</view>
<!-- 选择平台 -->
<l-arc-popup show="{{platformdia}}" max-height="700" min-height="200">
<view class="platitle">选择平台</view>
<view class="pla" wx:for="{{platforms}}" wx:key="index" data-mes="{{platforms[index]}}" bindtap="plachoose2">{{item.name}}
<view class="plaline" wx:if="{{index < platforms.length - 1}}"></view>
</view>
</l-arc-popup>

@ -30,7 +30,7 @@
}
.link {
height: 192rpx;
/* height: 192rpx; */
background: #F9F9F9;
border-radius: 4rpx;
padding: 36rpx;
@ -64,27 +64,60 @@
color: #333333;
line-height: 36rpx;
}
.record_list{
.record_list {
display: flex;
padding: 12rpx 0rpx;
margin: 16rpx 0rpx;
}
.link_name{
.link_name {
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
line-height: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
line-height: 28rpx;
}
.link_time{
.link_time {
font-size: 20rpx;
font-family: MiSans-Normal, MiSans;
font-weight: 400;
color: #999999;
line-height: 20rpx;
font-family: MiSans-Normal, MiSans;
font-weight: 400;
color: #999999;
line-height: 20rpx;
}
.link_text{
.link_text {
display: flex;
flex-direction: column;
justify-content: space-around;
}
.pla {
height: 96rpx;
background: #FFFFFF;
display: flex;
justify-content: space-around;
align-items: center;
flex-direction: column;
}
.plaline {
width: 686rpx;
height: 2rpx;
background: #FFFFFF;
box-shadow: inset 0rpx -1rpx 0rpx 0rpx #E8E8E8;
}
.platitle {
height: 96rpx;
font-size: 32rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
line-height: 32rpx;
display: flex;
justify-content: flex-start;
align-items: center;
flex-direction: column;
}

@ -24,7 +24,25 @@ Page({
url_non: "./image/ic_cbxg_nor@2x.png"
},
],
flag: 0
flag: 0,
table: [
{
one: '传播值',
two: '奖励积分'
},{
one: '0-1000',
two: '200'
},{
one: '1000~5000',
two: '300'
},{
one: '5000~10000',
two: '500'
},{
one: '10000以上',
two: '1000'
}
]
},
change(e) {
this.setData({'flag':e.target.dataset.index})

@ -7,7 +7,7 @@
<image wx:if="{{flag === index}}" class="sanjiao" src="./image/ic_sanjiao@2x.png"></image>
</view>
</view>
<detailed wx:if="{{flag === 0}}"></detailed>
<detailed wx:if="{{flag === 0}}" table="{{table}}"></detailed>
<link wx:if="{{flag === 1}}"></link>
<collection wx:if="{{flag === 2}}"></collection>
<effect wx:if="{{flag === 3}}"></effect>

@ -3,7 +3,7 @@
<view class="main">
<!-- 搜索栏 -->
<view class="search">
<l-search-bar class="search" placeholder="搜索" show-cancel="{{false}}" />
<l-search-bar bg-color="#F9F9F9" class="search" placeholder="搜索" show-cancel="{{false}}" />
</view>
<view class="count">
<view class="count_title">累计线索数量(条)</view>

@ -2,7 +2,7 @@
<view class="main">
<!-- 搜索栏 -->
<view class="search">
<l-search-bar class="search" placeholder="搜索" show-cancel="{{false}}" />
<l-search-bar bg-color="#F9F9F9" class="search" placeholder="搜索" show-cancel="{{false}}" />
</view>
<!-- 导航栏 -->
<view class="wrap">

@ -2,7 +2,7 @@
<view class="main">
<!-- 搜索栏 -->
<view class="search">
<l-search-bar class="search" placeholder="搜索" show-cancel="{{false}}" />
<l-search-bar bg-color="#F9F9F9" class="search" placeholder="搜索" show-cancel="{{false}}" />
</view>
<!-- 导航栏 -->
<view class="wrap">

@ -1,53 +1,153 @@
// pages/user/user.js
import {
http
} from '../../utils/util'
Page({
/**
* 页面的初始数据
*/
data: {
user_name: '马成泽',
user_tip: '欢迎来到星途~',
balance: 300,
user_data: [
{
name: '我的收藏夹',
img: '/images/ic_scscj@3x.png',
url: '/pages/user/subpage/newest/newest'
},{
name: '我的任务',
img: '/images/ic_wdrw@3x.png',
url: '/pages/user/subpage/quest/quest'
},{
name: '通用教程',
img: '/images/ic_tyjc@3x.png',
url: '/pages/user/subpage/tutorial/tutorial'
}
],
skills: [
{
name: "账号关联",
image: '/images/ic_zhgl@3x.png',
url: '/pages/user/subpage/relation/relation'
},{
name: "系统消息",
image: '/images/ic_xtxx@3x.png',
url: '/pages/user/subpage/system/system'
},{
name: "线索收集",
image: '/images/ic_xxsj@3x.png',
url: '/pages/user/subpage/colllection/colllection'
},{
name: "设置",
image: '/images/ic_sz@3x.png',
url: '/pages/user/subpage/setup/setup'
},
]
user_avatar: '/images/img_tx_ydl@2x.png',
user_name: '点击登录',
user_tip: '登录获得更多信息',
balance: 0,
user_data: [{
name: '我的收藏夹',
img: '/images/ic_scscj@3x.png',
url: '/pages/user/subpage/newest/newest'
}, {
name: '我的任务',
img: '/images/ic_wdrw@3x.png',
url: '/pages/user/subpage/quest/quest'
}, {
name: '通用教程',
img: '/images/ic_tyjc@3x.png',
url: '/pages/user/subpage/tutorial/tutorial'
}],
skills: [{
name: "账号关联",
image: '/images/ic_zhgl@3x.png',
url: '/pages/user/subpage/relation/relation'
}, {
name: "系统消息",
image: '/images/ic_xtxx@3x.png',
url: '/pages/user/subpage/system/system'
}, {
name: "线索收集",
image: '/images/ic_xxsj@3x.png',
url: '/pages/user/subpage/colllection/colllection'
}, {
name: "设置",
image: '/images/ic_sz@3x.png',
url: '/pages/user/subpage/setup/setup'
}, ],
userInfo: {},
canIUse: wx.canIUse('button.open-type.getUserInfo'),
canIUseGetUserProfile: false,
canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName'),
phone: false
},
to(e){
to(e) {
wx.navigateTo({
url: e.currentTarget.dataset.url,
})
},
userlogin() {
wx.login({
success: res => {
this.setData({
code: res.code
})
http("/user/login", "post", {
code: res.code
}).then(res => {
console.log(res)
if (res.msg === "未注册!") {
this.getUserProfile()
} else {
// getApp().globalData.token = res.token
this.setData({
user_avatar:res.data.user.avatar,
user_name:res.data.user.name,
user_tip:'欢迎来到星途~'
})
wx.setStorage({
key: 'user',
data: res.data.user
})
wx.setStorage({
key: 'token',
data: res.data.token
})
wx.getStorage({
key: 'token',
success (res) {
console.log(res.data)
}
})
}
})
}
})
},
getUserProfile(e) {
let that = this
// 推荐使用wx.getUserProfile获取用户信息开发者每次通过该接口获取用户个人信息均需用户确认开发者妥善保管用户快速填写的头像昵称避免重复弹窗
wx.login({
success: loginRes => {
wx.showModal({
title: '温馨提示',
content: '进一步获取用户信息',
success() {
wx.getUserProfile({
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (userRes) => {
console.log(userRes)
that.setData({
iv: userRes.iv,
encryptedData: userRes.encryptedData,
code: loginRes.code,
phone: true
})
}
})
}
})
}
})
},
getPhoneNumber(e) {
this.setData({
phone: false
})
let that = this
console.log(that.data.iv)
let param = {
userinfo: {
iv: this.data.iv,
encryptedData: this.data.encryptedData
},
phone: {
iv: e.detail.iv,
encryptedData: e.detail.encryptedData
},
code: this.data.code
}
http("/user/register", "post", param).then(res => {
wx.showToast({
title: '注册成功,请再次点击头像登录',
icon: 'none',
duration: 2000
})
})
},
colse () {
this.data({
phone: false
})
},
/**
* 生命周期函数--监听页面加载
*/
@ -56,6 +156,11 @@ Page({
title: '',
success: function (res) {}
})
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
})
}
},
/**

@ -1,20 +1,23 @@
<!--pages/user/user.wxml-->
<view class="main">
<!-- 部背景 -->
<!-- 部背景 -->
<view class="nav_image">
<image src="/images/img_wdbg@3x.png" style="height: 512rpx;"></image>
</view>
<!-- 用户头像余额 -->
<view class="owner">
<view class="user">
<view class="user_image"></view>
<image class="user_image" bindtap="userlogin" src="{{user_avatar}}"></image>
<!-- <button bindtap="getUserProfile" open-type="getUserInfo">注册</button> -->
<view class="user_name">
{{user_name}}
<view class="user_tip">{{user_tip}}</view>
<view class="user_tip">{{user_tip}}</view>
</view>
</view>
<view class="balance">
<view class="b_image"><image src="/images/img_jf@3x.png" style="width: 100%;height: 100%;"></image></view>
<view class="b_image">
<image src="/images/img_jf@3x.png" style="width: 100%;height: 100%;"></image>
</view>
{{balance}}
</view>
</view>
@ -22,7 +25,7 @@
<view class="user_data">
<view class="data_title">我的资料</view>
<view style="display: flex;justify-content: space-around;align-items: center;">
<view class="data_card" wx:for="{{user_data}}" wx:key="index" data-url="{{item.url}}" bindtap="to">
<view class="data_card" wx:for="{{user_data}}" wx:key="index" data-url="{{item.url}}" bindtap="to">
<image src="{{item.img}}" style="width: 96rpx;height: 96rpx;"></image>
{{item.name}}
</view>
@ -32,6 +35,14 @@
<view class="uni_skill">
<view class="skill_title">其他功能</view>
<!-- bind:lintap="to({{item.url}})" -->
<l-list wx:for="{{skills}}" wx:key="index" title="{{item.name}}" image="{{item.image}}" data-url="{{item.url}}" bindtap="to"/>
<l-list wx:for="{{skills}}" wx:key="index" title="{{item.name}}" image="{{item.image}}" data-url="{{item.url}}" bindtap="to" />
</view>
<!-- 获取手机号 -->
<view class="phone" wx:if="{{phone}}">
初次注册我们需要获取您的手机号
<view class="buts">
<button class="but" catchtap="colse">否</button>
<button class="but" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">是</button>
</view>
</view>
</view>

@ -22,7 +22,7 @@
}
.user_image {
width: 128rpx;
width: 128rpx!important;
height: 128rpx;
background: #006BFF;
border: 4rpx solid #FFFFFF;
@ -66,6 +66,7 @@
.b_image {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}
.user_data {
@ -106,4 +107,35 @@
border-radius: 16rpx;
margin: 32rpx;
padding: 32rpx;
}
.phone {
background: #FFFFFF;
border-radius: 16rpx;
margin: 32rpx;
padding: 32rpx;
display: flex;
flex-direction: column;
align-items: center;
box-shadow: gray 0rpx 0rpx 10rpx;
position: fixed;
top: 40vh;
width: 622rpx;
}
.buts {
display: flex;
justify-content: space-around;
margin-top: 32rpx;
width: 100%;
}
.but {
width: 200rpx !important;
background: #006BFF;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 40rpx;
}

@ -2,7 +2,7 @@
"projectname": "xx",
"setting": {
"compileHotReLoad": true,
"urlCheck": true
"urlCheck": false
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"libVersion": "2.24.2",

@ -0,0 +1,5 @@
const host = 'http://121.41.171.43:7340'
module.exports = {
host
}

@ -1,3 +1,7 @@
import {
host
} from './config'
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
@ -14,6 +18,54 @@ const formatNumber = n => {
return n[1] ? n : `0${n}`
}
module.exports = {
formatTime
const http = (url, method, data, isLoading = true) => {
if (isLoading) {
wx.showLoading({
title: '加载中'
});
}
return new Promise(function (resolve, reject) {
let token = getApp().globalData.token
let header = {
'Customer-Wxapp-Token': token
}
// if (token && uid) {
wx.request({
url: host + url,
data: data,
method: method,
header,
success: res => {
if (isLoading) {
wx.hideLoading();
}
if (200 == res.data.code) {
resolve(res.data);
} else if (10008 === res.data.code && res.data.msg === "未注册!") {
resolve(res.data)
} else {
wx.showToast({
title: res.data.msg,
icon: 'none',
duration: 2000
})
}
},
fail: res => {
wx.hideLoading();
}
})
// } else {
// wx.showToast({
// title: '未登录\r\n点击个人中心头像登录',
// icon: 'none',
// duration: 2000
// })
// }
})
}
module.exports = {
formatTime,
http
}
Loading…
Cancel
Save