38fe5e71 by simon

no message

1 parent c631d055
Showing 48 changed files with 1943 additions and 102 deletions
{
"pages": [
"pages/contact-table/contact-table",
"pages/contact/contact",
"pages/user-center/user-center",
"pages/contact/contact",
"pages/contact-table/contact-table",
"pages/index/index",
"pages/authorize/authorize",
"pages/gift-shop/gift-shop",
......@@ -56,6 +56,8 @@
},
"usingComponents": {
"authorize-comp": "../../component/authorize-comp/authorize-comp",
"common-tips-comp": "../../component/common-tips-comp/common-tips-comp",
"sign-tips-comp": "../../component/sign-tips-comp/sign-tips-comp",
"van-popup": "../../ui/vant-weapp/popup/index"
}
}
......
......@@ -18,9 +18,11 @@
// 雪碧图
// @lazysprite "filetype";
.test {
background-image: url(%ASSETS_IMG%/qr-r.jpg);
}
// .test {
// background-image: url(%ASSETS_IMG%/qr-r.jpg);
// }
$contentWidth:690px;
.app {
height: 100%;
......@@ -87,9 +89,11 @@
// web font icon
@font-face {
font-family: "iconfont";
src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAOsAAsAAAAAB6gAAANdAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqDDIJmATYCJAMMCwgABCAFhG0HORuvBsgOJUHBwIABAAlgPHyN/f7c3UVEk0mi+3QSQxJNJCoexUrxUhhKIyT4UsKbL89+kizTNWb3wyt7UkR96ayA4xev1q04fZzIa32ey/Gt5wc26luWy5iT9qKFAcYBBbQ3RgEFWiAJesPYlRdxn0C9YccRqxl5ZcBCYSwLxJFS3gwsUk6lpj7UCtUle4t4Yqo2XaeXAHj0vx//QUhYkFRlxtq1w/Q2kPRz+iOmhipDoM51Gx7PD3aIjBlAITZLgxuoMDODUq8YTerLqxUhjRU3GgFfqeqrzT88kiCqGbWNYAJlEz+nbQmJP1h91rUZVMPcGeAZM51XhqohJw97O/vO23paqy3T6coNhsqQ1esr3nVWF19mTZ3YnOwtWwPk5bvMfvYCQV11V+xUzZx02tPO6H02TtP0y4dn5a7M9ravfPvs/poNl43TTmVrW87O66dcKzd3myo2Tjo5rW07l6+fcXXd3KmUDdBKXH240GtvAAw49qfa2BeatkTevUsumTJX5pzRRVy781FXe+YP15YALi0+kkDHQRm8OLz2sP/U1NGjIPxKdyVpafxHpKWvbajtddvnaxmZHLP0XGY1d2wvLarJWrd3LMD6Q1DiSPHusrPgvOxtlAKDyt7bk32nH3emP+npcwo2dKU/Vj040Jn2+HTvAU5VFtOf5vZDf683NVrpbEvIO7N3IX421A40MRbmdVIPQGXQhMi7/+o3vjanTBtt4/7Vygr4/p/GIHW7aqBWorXqz7QVQMVYCK4xXLnISlup57Ntpvcth3Ju8j8aod2b/tauu8+FWl0xkhpDyGqNEIWZQZUG86hWawH1pmUebtBBQolShynjAKHVFSTNPpG1ekUU5jWqdPuGaq1Bod56OJ7ZYCyUdKqEmjFqgy3dUNkqCozlwXRQX4Lk7VyzlNT4XAWSNMo4DA4IyuYzkYCkMTZoOuQhGDOQkUQeZoDHEMeJUC2JKtSKAxQYq2MCA5myFwW0ijygrZAgzTCkDdSiG6TUSiRg3MEYnft8CUSuHaeZVNNTka6ASDSUo0PBAgS1IDKNQquea3lGo4NcCAxjQAyJiAdlgFkIhyOC1OWzVJBWWABFj5RajECzH9PWGDC/mX++Q1DPGJsjRY6i5hgx1hSNwhTxatwNAAAAAA==') format('woff2'),
// src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAScAAsAAAAACWAAAARQAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDSAqFVIRuATYCJAMYCw4ABCAFhG0HVRshCMgOJSGRwABgYAPDUEoeHvd7PTfJSwFAEah6VmX1dTtS08QKyKgZO6MrzNCI9/9/p93MlJPWQetZqTCDwumbgGcyBbEQPyFlu+svwP9zP59X1mB57dlcIpO6qHBnQOMBDSiiLVJ4Axl/1g9uMj9DgoHJYeziMrYT6LVoIdZxQpoAzBRav0A8lEvLwSymU0oooVtZc6YW8R2MdacP2GUA39zvx3/wCTOSJtOGXj2Ir4SoXzYvA/HW/62KaoC2/ixgZpGxBRTiRa7tEdwPbsH1Sn/ByAnQr1tSftk84z7b8oJ5Gfi/BTGR5gr9eipF0vT4z4sKyfoh7izU8MvGRCj84iIkfm1BaPjDIGT+BgpOS1VRlz7cAsQOaPgtstj5d4Rm2sJiwdWa42RrY6ulpEvbeDlLtnAqJzlZk8u4aPEAP3fpSuXt24I7d4R374oNhiJLRB4nmnP7duGSfo5AlMO3tXKFgsnW7QN8sXDxwM42nki8tK3mqIFow/X54sSBO+ECS/w5TujcY2N92Rz53GqTg2ASsDfb2bYDO1l46xNX5PVv4qy63W9wW7KFIH7scBavZFt/chQu3zazYAlvehIBR+Uu3swXr1AmWrKJw5lczhUu3srnL10hZneQz3q7g0dMbgPo8EzXZ6VkJQlEttQOBNR5QVncISGLWroG2VIHRSxo/2/IU1P4BrHLsYrCmEN92IEDGOK+5UARjuM+XO64nNbYV6Wv1xw+6P43+saNYsePY6Nil50laln7B910+c7pbYU5oEojI9iIVbBZ1r9w7vTe3vnzwe/ml+vG+g0bjh3LOf5Fq1W+Hs8G/7d39kaNdr0PNHe39rU+aJrdzQN/k9GLbIudBavigso8bNUCD8vnXpHt2SvHuBru2I2kPb0Ez2yxxi1na+LP1TdyvBG18WcVp2bVxJ3d0jBLpchzG7aoZmJpcMV7ix+w9nlq8tTH3dTXBhoB2tNpCl8EQH6DA7B0MANWH8+SRKFwixEr3/mhfmPufaG81Drsa3dfAbcRm2ZBQT0Z/BVytfm/T0EB2v9GwQqxvhaxvNlBoLpmjPwJvbqLFrpGPe5LNfEewqHbRAhJlwXIui2hCm4LGn12oeq2B702Jc7uM4aGi9KDDV0AwrC9kAz6CdmwK6iCewSNSW+hGg4cenXCfsk+KyEnYmlUzqBKsqKOlEu0GspGhvAyc5C0SlVOR4UuVYRovdxDent4JSOJSIPoPkboq6U+DEORFK1VkwlgN6RSaUkdrVUgCeMhYxhdiKcnlXcjD4lWDYQjNKQcA6lEqlCHJCehpUHZtRlE6vM5EKkqKuXokrISqwhC05M3TvLmwasGKlGmqVV2Lq31qkn5YDAo3ItC01IjJUALotKDWiRdficFRILhQdbCrxPCE1Wi6so8xleor3Id9NLWqZEiR4kmanTpuVMuUe5/U28TiUqrR96mNKI8Ti8zkmnVyBipdUwdAA==') format('woff2'),
src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAT4AAsAAAAAClgAAASsAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDdAqHBIYEATYCJAMgCxIABCAFhG0HZhv8CMgOJU2RwMBgYANAPDzt1+/cmXn+TXFL0ESrpU2IJ0LDo1hJlIqXQChfS9j//73sBlWmUDqts1JhDgrtTl9G0clkKX7SnP//fqWTxwcsrz0blBF8f6KaKgJoeIAGKGqzqch2QcpxH+AZLkzg3QR6e/SEXc8v1YCzQtgXiOdmY29wdhmVGEZoNXXImUV8g0qb3uNnAXzVvz62ITqcSapMOPL2s7w2yFxzfJVAjLCPcEc1w7vy7LidR8YpoBDfQp0fZDNyCqH/pBb3gBnxLxKsOT73fE4/r3m+7qXyKsFu97WiMnI14TZQKZJaU8s/L2qCcgLpT6INa44yomLNE1FYoxGJtRqFdKp1iGjYUBCZzQTxzCpb9YwZYJroiJcgqM/rypiRY0KSVCuurrtDPFzpFRcCvTy9RNY4f6Rf9bx1vm1zfCvnLKDR3MnqmvmLrVevaq5d0964ob9+vVGS6wzCWXT1asO8Sb4anfL4DSNorWbOiI2T1Xrt3MmbR/rp9PNH9t9/ncojMEXvUydfS9O4ES8IyuiJCh+yfPSLq081155pb7zQX3/eREEfImmYUthx7mv8NXMgvd2o8pq8GSNqe+ai2klrfJdcnXQ9dN46ivq+KUi/WOXxMUC7cEPH+nl+3ZFrHkx67lq1/hqtunlrfH3nLKS1c9er1fMX6VUFlGLvNvlRczaAAl/pYqfiykKNzovdhIC9Ud+au0eLsfOXIS92tw6DsX1VvnmTWCVilVCa7KQ9E/Fdu3CUTWQCpZxC310YsFAWsDZljLEcPkr2ITG5M/CDB/EZIlaxcoUB2M4poVJdUNnIhmrg0vTpOMg4xHjVuIau7SdM6N4dYh/+Dlk9aNWqAweqD34Vxet8O1gFTK46SjpW5R951NHxL2nLa6o75uhwwGHbNkXqS5Ljzr27tj1zxtgPCS5hHjEeu2VbmEuCc8mM0yrXMz2W5Ca28lFLeoS7vYjMGFW1eCYt0DO1Y+WISM1zL3zIuuP9804MGuJrHDMg77jlSKf+ucfXDe7EWcJ819dxHdE+OIQoLXWyR/RDx4fR+m1jPGE4wPhoukn0AiC/JQDsI/w66w5mUZ5J/NvzJaIqNpzE8qMz9nusbZgvt3ikfmuHAv7nzTChOF0MtNJ+UDk/GwowtpNxlwimtry7k42iLOcDDvdQQi8SPw0I3jn3y9Qu7lZ53NWLNiSN3ZC1DpEL/RRUBmeh1roEvZMKzh/MkxGidDhhLECYsR2SKT8gm3GOXOj3oLLkHdRmgoDeKHyuODgSZipHRr0V1Mb0GciYDaLAShaFMvKrkbEv11t2SnSmDsk2s5+JCo/0xguQgOQyjrH1M0YrCsuwssgz+XA/xHEiI8miBRmUcJOiSMkREWzYB4UbRB4o18iQ3hRIG0YfAzHMDEQCVp2toHyfXw0x6ovTmxzT9sOrg8hszIszooSLTEEuUAqp2rZltU0/RtEUCpZ3sWQiHiMf7QgnRkQMKXyTBWKgCGfKEZIki6BxbFpleP1qfknPQU+4aRspcpSooo4m2uh0j3obrHOwNMrRwIk2FOUkI1Z6kc1EmkQeOQ0wC4OQYCQlrq/NAfGSMhAA') format('woff2'),
}
.iconfont {
......@@ -108,6 +112,32 @@
content: "\e6a6";
}
.iconclose1:before {
content: "\e615";
}
.iconhome:before {
content: "\e610";
}
.iconbackicon1:before {
content: "\e937";
}
.iconplus:before {
content: "\e653";
}
.iconplus:before {
content: "\e653";
}
.iconxinzeng:before {
content: "\e606";
}
.drop-down-item :last-child {
border-bottom: none;
}
......@@ -116,6 +146,16 @@
color: $colorBlue;
}
.border {
width: $contentWidth;
@extend .shadow;
background-color: #ffffff;
@extend .bb;
padding: 24px 30px;
margin: 0 auto 20px;
}
.van-popup {
background-color: transparent !important;
}
......
......@@ -220,6 +220,13 @@
justify-content: space-between;
}
.fje {
display: flex;
justify-content: flex-end;
}
//水平和垂直居中
.fcc {
display: flex;
......
let app = getApp();
Component({
properties: {
// 这里定义了innerText属性,属性值可以在组件使用时指定
// cid 用户区分组件
cid: {
type: String,
value: '1',
},
innerTitle: {
type: String,
value: '',
},
innerText: {
type: String,
value: '',
},
innerButton: {
type: String,
value: '确定',
}
},
data: {
// 这里是一些组件内部数据
someData: {}
},
methods: {
// 这里是一个自定义方法
customMethod() {
this.triggerEvent('evtcomp', {
name: "_evt_custom"
})
},
// 隐藏蒙层
hideMask() {
this.triggerEvent('evtcomp', {
name: "_evt_hide_mask"
});
},
// 点击自定义按钮
onInnerButtonHandler() {
this.triggerEvent('evtcomp', {
name: "_evt_common_comp_button",
data: {
cid: this.properties.cid,
innerTitle: this.properties.innerTitle,
innerText: this.properties.innerText,
innerButton: this.properties.innerButton,
}
});
}
}
})
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
.comp-item {
width: 650px;
min-height: 496px;
border-radius: 10px;
background-color: #ffffff;
.cspace {
height: 76px;
}
.cont {
text-align: center;
width: 520px;
margin: 0 auto;
.logo {
margin: 0 auto;
width: 200px;
height: 153px;
image {
width: 200px;
height: 153px;
}
}
.tit {
font-size: 40px;
color: #333333;
}
.tips {
margin-top: 64px;
font-size: 32px;
color: #333333;
width: 520px;
padding-bottom: 244px;
}
}
.btn {
@include cb(300px, 80px);
position: absolute;
left: 0;
right: 0;
bottom: 48px;
margin: 0 auto;
}
}
<view class="comp-item">
<view class="cspace"></view>
<view class="cont">
<view class="tit">{{innerTitle}}</view>
<view class="tips">
<text>{{innerText}}</text>
</view>
</view>
<button class="btn" bindtap="onInnerButtonHandler">{{innerButton}}</button>
</view>
let app = getApp();
Component({
properties: {
// 这里定义了innerText属性,属性值可以在组件使用时指定
// cid 用户区分组件
cid: {
type: String,
value: '1',
},
innerTitle: {
type: String,
value: '',
},
innerText: {
type: String,
value: '',
},
innerButton: {
type: String,
value: '确定',
}
},
data: {
// 这里是一些组件内部数据
someData: {}
},
methods: {
// 这里是一个自定义方法
customMethod() {
this.triggerEvent('evtcomp', {
name: "_evt_custom"
})
},
// 隐藏蒙层
hideMask() {
this.triggerEvent('evtcomp', {
name: "_evt_hide_mask"
});
},
// 点击自定义按钮
onInnerButtonHandler() {
this.triggerEvent('evtcomp', {
name: "_evt_to_verify"
});
}
}
})
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
.comp-item {
width: 650px;
min-height: 496px;
border-radius: 10px;
background-color: #ffffff;
.cspace {
height: 76px;
}
.cont {
text-align: center;
width: 520px;
margin: 0 auto;
.logo {
margin: 0 auto;
width: 200px;
height: 153px;
image {
width: 200px;
height: 153px;
}
}
.tit {
font-size: 40px;
color: #333333;
width: 440px;
margin: 0 auto;
}
.tips {
margin-top: 64px;
font-size: 32px;
color: #333333;
width: 520px;
padding-bottom: 244px;
}
}
.btn-wrap {
position: absolute;
left: 0;
right: 0;
bottom: 48px;
margin: 0 auto;
.b1 {
@include cb(320px, 84px);
}
.b2 {
margin: 36px auto 0;
font-size: 28px;
color: #999999;
text-align: center;
}
}
}
<view class="comp-item">
<view class="cspace"></view>
<view class="cont">
<view class="tit">
<text>只有通过审核的会员才可参与签到</text>
</view>
<view class="tips">
<text></text>
</view>
</view>
<view class="btn-wrap">
<button class="b1" bindtap="onInnerButtonHandler">马上去验证</button>
<view class="b2" bindtap="hideMask">以后再说</view>
</view>
</view>
module.exports = {
mockApi: 'http://mock.simonfungc.com',
Dev: {
baseApi: 'https://ow.go.qudone.com/zlzmapi'
},
Test: {
baseApi: 'https://test-api.xxx.com'
},
Slave: {
baseApi: 'https://slave-api.xxx.com'
},
Prod: {
baseApi: 'https://api.k.wxpai.cn/bizproxy/zlzmapi'
}
mockApi: 'http://mock.simonfungc.com',
Dev: {
baseApi: 'https://ow.go.qudone.com/zlzmapi',
commonApi: 'https://api.k.wxpai.cn/bizproxy'
},
Test: {
baseApi: 'https://test-api.xxx.com'
},
Slave: {
baseApi: 'https://slave-api.xxx.com'
},
Prod: {
baseApi: 'https://api.k.wxpai.cn/bizproxy/zlzmapi',
commonApi: 'https://api.k.wxpai.cn/bizproxy'
}
}
......
......@@ -33,4 +33,9 @@ module.exports = {
signInfo: '/sign/info', // post 签到信息 用户注册接口
sign: '/sign', // post 签到动作 用户注册接口
sginRecord: '/sgin/record', // post 签到记录 用户注册接口
provinceQuery: 'https://ow.go.qudone.com/warubiEyeCreamApi/app/store/province', // post 省
cityQuery: 'https://ow.go.qudone.com/warubiEyeCreamApi/app/store/city', // post 省
uploadFile: '/kdapi/file/upload' //上传图片通用接口
}
......
......@@ -104,6 +104,13 @@ const fetch = function ({
if (isMock && mode != 'log') {
baseUrl = config.MOCKAPI; //环境配置
}
if (mode == "common") {
console.log("config.NET_CONFIG.commonApi:", config.NET_CONFIG.commonApi);
baseUrl = config.NET_CONFIG.commonApi
}
if (mode == "custom") {
baseUrl = ""
}
checkSessionId(sid).then((result) => {
wx.request({
url: baseUrl + url, //请求地址
......
import {
getBindtapData,
checkMobile
} from '../../utils/util';
let app = getApp();
Page({
data: {
authorizeVisible: false,
commonTipsCompVisible: false,
innerTitle: "留言提交成功!",
innerText: "感谢您宝贵的意见\n我们将尽快回电或回复信息",
maxImg: 9, // 上传数量
files: [], // 上传文件列表
name: "",
phone: "",
messageContant: "", // 单词拼写错误
},
onShareAppMessage() {},
showAuth() {
......@@ -9,5 +24,229 @@ Page({
authorizeVisible: true
})
},
onLoad(options) {}
onLoad(options) {
this.initData();
},
initData() {
this.setData({
commonTipsCompVisible: true
})
},
/**
* 提交表单
*/
onSubmitHandler() {
let {
name,
phone,
messageContant,
files
} = this.data;
let pics = [];
files.forEach(element => {
pics.push(element.path)
});
// 校验
if (!name) {
wx.showToast({
title: "请输入用户姓名",
icon: 'none'
})
return;
}
if (!phone) {
wx.showToast({
title: "请输入联系方式",
icon: 'none'
})
return;
}
if (!checkMobile(phone)) {
wx.showToast({
title: "请输入正确联系方式",
icon: 'none'
})
return;
}
if (!messageContant) {
wx.showToast({
title: "请输入联系方式",
icon: 'none'
})
return;
}
if (pics.length <= 0) {
wx.showToast({
title: "请上传图片",
icon: 'none'
})
return;
}
// 上传图片到服务器
this.uploadToCustomService(pics).then((result) => {
// 提交表单
app.post({
url: app.api.messageSave,
data: {
name: name,
phone: phone,
messageContant: messageContant,
images: result.join(','),
}
}).then((result2) => {
this.setData({
commonTipsCompVisible: true
})
});
})
},
/**
* 上传到自定义服务器
* urlList 需要上传的图片地址
*/
uploadToCustomService(urlList) {
let _this = this;
return new Promise((resolve, reject) => {
// promise列表
let p = [];
// 用promise上传音频
urlList.forEach(element => {
let myPromise = new Promise((resolve2, reject2) => {
_this.uploadfileMultiple(element).then((result2) => {
resolve2(result2)
}).catch((err) => {
// _this.tip("声音上传失败")
reject2();
});
});
p.push(myPromise);
});
Promise.all(p).then(uploadFiles => {
resolve(uploadFiles)
}, reason => {
reject();
});
});
},
/**
* 多文件上传
* @param {*} filePath
*/
uploadfileMultiple(filePath) {
let _this = this;
return new Promise((resolve, reject) => {
wx.uploadFile({
url: app.config.NET_CONFIG.commonApi + app.api.uploadFile,
filePath: filePath,
name: 'file',
// header: {}, // 设置请求的 header
header: {
'content-type': 'multipart/form-data'
},
formData: {
path: '/weapp/zhiliang-light/'
},
// HTTP 请求中其他额外的 form data
success(res) {
let result = JSON.parse(res.data).content;
resolve(result);
},
fail() {
reject()
},
complete: function () {}
})
});
},
/**
* 调起微信图片上传
*/
onUploadHandler() {
let _this = this;
let count = _this.data.maxImg - _this.data.length;
wx.chooseImage({
sizeType: ['original', 'compressed'],
sourceType: ['album'],
count: count,
success(res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFiles = res.tempFiles
let maxImg = _this.data.maxImg;
let files = _this.data.files;
files = files.concat(tempFiles);
if (files.length > maxImg) {
files.splice(0, maxImg);
}
_this.setData({
files
});
}
})
},
/**
* 删除选中图片
*/
remove(evt) {
let index = getBindtapData(evt, "index");
let files = this.data.files;
files.splice(index, 1);
this.setData({
files
})
},
/**
* 绑定键盘输入
*/
bindNameInput(e) {
this.setData({
name: e.detail.value
});
},
/**
* 绑定键盘输入
*/
bindPhoneInput(e) {
this.setData({
phone: e.detail.value
});
},
/**
* 绑定键盘输入
*/
bindMessageContantInput(e) {
this.setData({
messageContant: e.detail.value
});
},
// 隐藏蒙层
hideMask() {
this.setData({
commonTipsCompVisible: false
})
},
// 子组件事件
evtcomp(evt) {
let {
name,
data
} = evt.detail;
switch (name) {
case "_evt_common_comp_button":
this.hideMask();
wx.navigateBack({
delta: 1
});
break;
default:
break;
}
},
})
......
......@@ -4,6 +4,8 @@
$contentWidth:690px;
.page {
padding-bottom: $pageBottom;
.bgc {}
.bg {}
......@@ -16,12 +18,16 @@ $contentWidth:690px;
.content {
position: relative;
// 表单
.form {
color: #333333;
&-item {
height: 72px;
font-size: 28px;
display: flex;
justify-content: space-between;
align-items: center;
margin: 30px auto;
.label {
......@@ -33,6 +39,16 @@ $contentWidth:690px;
.val {
flex: 1;
color: #333333;
background: #F8F8F8;
// background-color: wheat;
@extend .bb;
padding: 0px 20px;
border-radius: 8px;
}
input {
height: 72px;
}
.net {
......@@ -48,26 +64,114 @@ $contentWidth:690px;
margin-right: 10px;
}
}
}
.upload{
margin-top: 30px;
.tips{
font-size: 28px;
color: #666666;
}
.upload{}
}
.textarea {
background: #F8F8F8;
@extend .bb;
padding: 20px;
width: 620px;
@extend .bb;
background: #F8F8F8;
font-size: 28px;
}
}
// 提交
.submit-btn {
@include cb(320px, 84px);
margin: 120px auto 0;
}
}
}
}
// 图片上传
.upload {
margin-top: 30px;
.tips {
font-size: 28px;
color: #666666;
}
.upload {
margin: 0 auto;
width: $contentWidth;
border-radius: 8px;
background-color: #ffffff;
&-input {
@extend .bb;
padding: 30px;
font-size: 30px;
line-height: 1.35;
color: #333333;
textarea {
width: $contentWidth;
min-height: 200px;
// background-color: wheat;
}
}
&-file {
display: flex;
flex-wrap: wrap;
margin: 20px auto 0;
&-item {
position: relative;
width: 33%;
@extend .bb;
margin-bottom: 12px;
.thumb {
width: 190px;
height: 190px;
}
.remove {
position: absolute;
right: 2px;
top: -28px;
font-size: 40rpx;
}
}
}
&-tag {
position: relative;
margin-top: 20px;
padding: 8px;
@extend .bb;
&-item {
display: inline-block;
position: relative;
padding: 12px 32px;
border-radius: 40px;
background-color: #f7f7f7;
font-size: 26px;
font-weight: 500;
text-align: center;
color: #1477bd;
margin: 10px;
border: solid 2.5px #1477bd;
background-color: #e6f5ff;
}
}
&-submit {
margin: 80px auto 0;
width: 450px;
height: 88px;
line-height: 88px;
border-radius: 44px;
background-image: linear-gradient(95deg, #2baedf, #1376bc);
font-size: 36px;
text-align: center;
color: #ffffff;
}
}
}
......
......@@ -8,23 +8,35 @@
<view class="form">
<view class="form-item">
<view class="label">用户姓名</view>
<view class="val">深圳市龙岗区龙信工业区A栋</view>
<input class="val" bindinput="bindNameInput" placeholder="请输入姓名" />
</view>
<view class="form-item">
<view class="label">联系方式</view>
<view class="val">深圳市龙岗区龙信工业区A栋</view>
<input class="val" bindinput="bindPhoneInput" placeholder="请输入联系方式" type="number" />
</view>
<view class="form-item"></view>
<textarea class="textarea" placeholder="不超过500字"></textarea>
<textarea class="textarea" bindinput="bindMessageContantInput" maxlength="500" placeholder="不超过500字"></textarea>
<!-- 图片上传 -->
<view class="upload">
<view class="tips">上传照片</view>
<!-- <view class="up"></view> -->
<view class="upload-file">
<view class="upload-file-item" wx:for="{{files}}" wx:key="{{index}}">
<image class="thumb" src="{{item.path}}" mode="aspectFill" />
<span class="iconfont iconclose1 remove" data-index="{{index}}" bindtap="remove"></span>
</view>
<view class="upload-file-item" wx:if="{{files.length < maxImg}}">
<image class="thumb" src="../../image/icon/icon-upload.png" mode="aspectFill" bindtap="onUploadHandler" />
</view>
</view>
</view>
</view>
</view>
<view class="submit-btn" bindtap="onSubmitHandler">提交</view>
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
<van-popup show="{{ commonTipsCompVisible }}">
<common-tips-comp bind:evtcomp="evtcomp" inner-title="{{innerTitle}}" inner-text="{{innerText}}"></common-tips-comp>
</van-popup>
......
import {
getBindtapData
} from '../../utils/util';
let app = getApp();
Page({
data: {
authorizeVisible: false,
contactInfo: {}
},
onShareAppMessage() {},
showAuth() {
......@@ -9,5 +14,38 @@ Page({
authorizeVisible: true
})
},
onLoad(options) {}
onLoad(options) {
this.initData();
},
initData() {
this.queryContact();
},
// 去联系我们表单页面
onContactUserTableHandler() {
app.router.push({
path: "contactTable"
})
},
// 打电话
onMakePhoneCallHandler(evt) {
let phoneNumber = getBindtapData(evt);
wx.makePhoneCall({
phoneNumber: phoneNumber
})
},
// 联系我们
queryContact() {
return new Promise((resolve, reject) => {
app.post({
url: app.api.contact,
sid: false
}).then((result) => {
this.setData({
contactInfo: result
})
console.log("result:", result);
})
resolve();
});
}
})
......
......@@ -5,7 +5,7 @@
<view class="top-space"></view>
<view class="content">
<!-- banner -->
<view class="banner">
<view class="banner" bindtap="onContactUserTableHandler">
<image class="image" mode="widthFix" src="../../image/contact/contact-c1.png" />
</view>
<!-- 表单 -->
......@@ -13,29 +13,29 @@
<view class="form">
<view class="form-item">
<view class="label">生产地址</view>
<view class="val">深圳市龙岗区龙信工业区A栋</view>
<text class="val">{{contactInfo.contactCompany}}</text>
</view>
<view class="form-item">
<view class="label">电话</view>
<view class="val">0755-28839576</view>
<view class="exts">
<text class="val">{{contactInfo.contactTel}}</text>
<view class="exts" bindtap="onMakePhoneCallHandler" data-data="{{contactInfo.contactTel}}">
<image class="icon" mode="aspectFit" src="../../image/contact/contact-c2.png" />
</view>
</view>
<view class="form-item">
<view class="label">手机</view>
<view class="val">0755-28839576</view>
<view class="exts">
<text class="val">{{contactInfo.contactPhone}}</text>
<view class="exts" bindtap="onMakePhoneCallHandler" data-data="{{contactInfo.contactPhone}}">
<image class="icon" mode="aspectFit" src="../../image/contact/contact-c2.png" />
</view>
</view>
<view class="form-item">
<view class="label">网址</view>
<view class="val net">www.zgzlzm.com</view>
<text class="val net">{{contactInfo.contactNetwork}}</text>
</view>
<view class="form-item">
<view class="label">E-mail</view>
<view class="val net">www.zgzlzm.com</view>
<text class="val net">{{contactInfo.contactEmail}}</text>
</view>
</view>
</view>
......
......@@ -103,6 +103,11 @@ Page({
}
})
},
hideMask() {
this.setData({
productDetailVisible: false
})
},
// 子组件事件
evtcomp(evt) {
let {
......@@ -112,9 +117,7 @@ Page({
switch (name) {
case "_evt_hide_product_detail_mask":
this.setData({
productDetailVisible: false
})
this.hideMask();
break;
default:
......
{
"navigationBarTitleText": "more"
"navigationBarTitleText": "我的二维码"
}
......
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
$contentWidth:690px;
.page {
.bgc {}
padding-bottom: $pageBottom;
.bgc {
background: #3680EB;
}
.bg {}
.main {
font-size: 28px;
.top-space {
height: 0px;
height: 40px;
}
.content {
position: relative;
.card {
margin: 0 auto;
padding: 20px 0 74px;
width: $contentWidth;
background: #FFFFFF;
box-shadow: 0 3px 9px 0 rgba(0, 0, 0, 0.10);
border-radius: 10px;
text-align: center;
font-size: 32px;
.avatar {
width: 120px;
height: 120px;
border-radius: 120px;
}
.nickname {
margin: 8px 0 0;
font-size: 36px;
color: #3680EB;
}
.qrcode {
margin-top: 40px;
width: 440px;
height: 440px;
}
.t1 {
margin-top: 20px;
color: #666666;
}
.t2 {
margin-top: 40px;
}
}
.tips {
margin: 20px auto 0;
color: #FFFFFF;
text-align: center;
}
.btn-wrap {
margin-top: 40px;
.btn {
margin: 0 auto;
@include btc(320px, 84px);
border-radius: 8px;
background: #FFFFFF;
color: #3680EB;
font-size: 32px;
}
}
}
}
}
......
......@@ -3,9 +3,21 @@
<view class="app__bg bg"></view>
<view class="app__content main">
<view class="top-space"></view>
<view class="content"></view>
<view class="content">
<view class="card">
<image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" />
<view class="nickname">昵称填充</view>
<image class="qrcode" mode="widthFix" src="../../image/icon/icon-default-qrcode.png" />
<view class="t1">深士照明</view>
<view class="t1 t2">扫码即获专属积分,兑换超值奖品</view>
</view>
<view class="tips">分享邀请好友加入,赢取推广积分</view>
<view class="btn-wrap">
<view class="btn">保存图片</view>
</view>
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}" >
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
......
import {
getBindtapData
} from '../../utils/util';
let app = getApp();
Page({
data: {
authorizeVisible: false,
navIndex: 0,
},
onShareAppMessage() {},
showAuth() {
......@@ -9,5 +14,27 @@ Page({
authorizeVisible: true
})
},
onLoad(options) {}
onLoad(options) {},
initData() {
},
/**
* 选择导航
* @param {*} evt
*/
onNavSelectHandler(evt) {
let navIndex = this.data.navIndex;
let curIndex = getBindtapData(evt, "index");
if (navIndex != curIndex) {
this.setData({
navIndex: curIndex
})
}
},
// 滚动到底部 分页加载
onRankScrolltolower(e) {
}
})
......
{
"navigationBarTitleText": "more"
"navigationBarTitleText": "积分排行"
}
......
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
$contentWidth:690px;
.page {
.bgc {}
padding-bottom: $pageBottom;
.bgc {
background: #3680EB;
}
.bg {}
.bg {
position: absolute;
width: 750px;
height: 1162px;
}
.main {
font-size: 28px;
color: #333333;
.top-space {
height: 0px;
height: 20px;
}
.content {
position: relative;
// 导航
.nav {
display: flex;
justify-content: space-between;
position: relative;
margin: 0 auto;
width: $contentWidth;
&-item {
width: 50%;
.tit {
text-align: center;
font-size: 32px;
color: rgba($color: #FFFFFF, $alpha: 0.5);
}
.line {
margin: 12px auto 0;
width: 0px;
height: 6px;
border-radius: 4px;
background: #FFFFFF;
transition: width 0.2s ease;
}
}
&-item-act {
.tit {
color: rgba($color: #FFFFFF, $alpha: 1);
}
.line {
width: 60px;
}
}
}
// 排行榜
.rank {
margin: 20px auto 0;
min-height: 1000px;
// 功能区
&-func {
position: relative;
display: flex;
justify-content: space-between;
&-item {
width: 50%;
// .pubish {
display: flex;
align-items: center;
flex-wrap: wrap;
.t1 {
color: #666666;
font-size: 24px;
padding: 5px 0;
}
.t2 {}
.c1 {
color: #FF7900;
}
.c2 {
color: #3680EB;
}
// }
.mode {
width: 220px;
height: 56px;
background: #F5F8FE;
border-radius: 28px;
font-size: 26px;
color: #3F85EB;
@extend .bb;
padding: 10px 32px;
}
}
}
// 标题
.tit {
width: 630px;
height: 40px;
font-size: 20px;
color: #3680EB;
background: rgba($color: #3680EB, $alpha: 0.05);
border-radius: 20px;
margin: 26px auto 0;
display: flex;
.tt {
height: 40px;
line-height: 40px;
}
.t1 {
margin-left: 18px;
}
.t2 {
margin-left: 172px;
}
.t3 {
margin-left: 238px;
}
}
// 排行item
.item-wrap {
margin: 16px auto 0;
height: 630px;
}
// 省略号
.etc {
text-align: center;
height: 82px;
line-height: 82px;
font-size: 32px;
color: #333333;
}
.my-rank {
background: #F5F8FE;
.rank-item {
height: 112px;
// border-bottom: none;
}
}
// 排行item
.rank-item {
display: flex;
justify-content: space-between;
border-bottom: solid 1px #dddddd;
$itemHeight: 104px;
height: $itemHeight;
.no {
width: 72px;
padding-right: 76px;
@extend .fcc;
// text-align: center;
// height: $itemHeight;
// line-height: $itemHeight;
.medal {
width: 52px;
height: 68px;
}
}
.user {
flex: 1;
display: flex;
align-items: center;
font-size: 32px;
.avatar {
width: 72px;
height: 72px;
margin-right: 12px;
}
}
.integral {
color: #666666;
width: 124px;
display: flex;
align-items: center;
// @extend .fcc;
// height: $itemHeight;
// line-height: $itemHeight;
}
}
.rank-item-first {
.integral {
color: #FF7900;
}
}
}
// 按钮容器
.btn-wrap {
position: relative;
margin: 20px auto 0;
.btn {
position: relative;
width: 220px;
height: 64px;
line-height: 64px;
border-radius: 42px;
background: #FFFFFF;
margin: 0 auto;
color: #3680EB;
text-align: right;
padding-right: 32px;
@extend .bb;
.integral {
position: absolute;
left: -52px;
top: -20px;
width: 148px;
height: 108px;
}
}
}
}
}
}
......
<view class="page">
<view class="app__bgc bgc"></view>
<view class="app__bg bg"></view>
<!-- <view class="app__bg bg"></view> -->
<image class="bg" mode="widthFix" src="../../image/rank/rank-c1.png" />
<view class="app__content main">
<view class="top-space"></view>
<view class="content"></view>
<view class="content">
<!-- 导航 -->
<view class="nav">
<view bindtap="onNavSelectHandler" data-index="0" class="nav-item {{navIndex == 0 ? 'nav-item-act':''}}">
<view class="tit">推广积分排行</view>
<view class="line"></view>
</view>
<view bindtap="onNavSelectHandler" data-index="1" class="nav-item {{navIndex == 1 ? 'nav-item-act':''}}">
<view class="tit">总积分排行</view>
<view class="line"></view>
</view>
</view>
<!-- 排行 -->
<view class="border rank">
<!-- 功能区 -->
<view class="rank-func">
<view class="rank-func-item">
<view class="pubish">
<view class="t1">
本轮周期:
<span>7.1-7.14</span>
</view>
<!-- <view class="t1 t2">
本轮奖品:
<span class="c1">88元红包</span>
</view> -->
<view class="t1 t2">
我的名次:
<span class="c2">12</span>
</view>
</view>
</view>
<view class="rank-func-item pubish fje">
<view class="mode">查看历史排行</view>
</view>
</view>
<!-- 标题 -->
<view class="tit">
<view class="tt t1">名次</view>
<view class="tt t2">名称</view>
<view class="tt t3">积分</view>
</view>
<!-- 排行item -->
<scroll-view bindscrolltolower="onRankScrolltolower" scroll-y="{{true}}" class="item-wrap">
<view class="rank-item rank-item-first">
<view class="no">
<image class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" />
</view>
<view class="user">
<image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" />
nickname
</view>
<view class="integral">1000</view>
</view>
<view class="rank-item">
<view class="no">2</view>
<view class="user">
<image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" />
nickname
</view>
<view class="integral">1000</view>
</view>
<view class="rank-item">
<view class="no">2</view>
<view class="user">
<image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" />
nickname
</view>
<view class="integral">1000</view>
</view>
<view class="rank-item">
<view class="no">2</view>
<view class="user">
<image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" />
nickname
</view>
<view class="integral">1000</view>
</view>
<view class="rank-item">
<view class="no">2</view>
<view class="user">
<image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" />
nickname
</view>
<view class="integral">1000</view>
</view>
<view class="rank-item">
<view class="no">2</view>
<view class="user">
<image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" />
nickname
</view>
<view class="integral">1000</view>
</view>
<view class="rank-item">
<view class="no">2</view>
<view class="user">
<image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" />
nickname
</view>
<view class="integral">1000</view>
</view>
</scroll-view>
<!-- 省略号 -->
<view class="etc">...</view>
<!-- 我的排名 -->
<view class="my-rank">
<view class="rank-item">
<view class="no">
1
<!-- <image class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" /> -->
</view>
<view class="user">
<image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" />
nickname
</view>
<view class="integral">300</view>
</view>
</view>
</view>
<!-- 我的奖励按钮 -->
<view class="btn-wrap">
<view class="btn">
<image class="integral" mode="aspectFit" src="../../image/icon/icon-rank-rewrad.png" />
我的奖励
</view>
</view>
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}" >
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
......
import {
getBindtapData
} from '../../utils/util';
let app = getApp();
Page({
data: {
authorizeVisible: false,
userInfo: {},
commonTipsCompVisible: false,
signTipsCompVisible: false,
innerTitle: "留言提交成功!",
innerText: "感谢您宝贵的意见\n我们将尽快回电或回复信息",
// innerButton: "",
userInfo: {}, // 用户数据
signInfo: [], // 签到数据
signNum: 0, // 签到天数
},
onShareAppMessage() {},
showAuth() {
......@@ -17,8 +28,70 @@ Page({
this.initData();
},
initData() {
this.queryMember();
this.queryMember().then((result) => {
this.querySignInfo();
});
},
/**
* 点击签到
*/
onSignHandler(evt) {
console.log("onSignHandler");
return new Promise((resolve, reject) => {
app.post({
toast: false,
url: app.api.sign,
}).then((result) => {
this.querySignInfo().then((result2) => {
wx.showModal({
content: '签到成功',
showCancel: false,
success(res) {}
})
})
}).catch((err) => {
let {
code
} = err;
// 用户未审核
if (code == 1002) {
this.setData({
signTipsCompVisible: true
})
}
});
});
},
/**
* 我的二维码
*/
onMyQrcodeHandler(evt) {
app.router.push({
path: "myQrcode"
})
},
/**
* 排行榜
*/
onRankHandler(evt) {
app.router.push({
path: "rank"
})
},
/**
* 点击联系我们
*/
onContactUsHandler(evt) {
app.router.push({
path: "contact"
})
},
/**
* 获取会员信息
*/
......@@ -36,6 +109,49 @@ Page({
});
},
/**
* 签到信息
*/
querySignInfo() {
return new Promise((resolve, reject) => {
app.post({
url: app.api.signInfo,
data: {}
}).then((result) => {
let signNum = result.signRecord && result.signRecord.length || 0;
console.log("signNum:", signNum);
let resultList = result.signRecord || [];
let signInfo = [];
for (let index = 0; index < 7; index++) {
signInfo.push(resultList[index] ? resultList[index] : "");
}
this.setData({
signInfo: signInfo,
signNum: signNum
})
console.log("signInfo:", signInfo);
resolve();
})
});
},
/**
* 去验证
*/
toVipLogin() {
app.router.push({
path: "vipLogin"
})
},
// 隐藏蒙层
hideMask() {
this.setData({
authorizeVisible: false,
commonTipsCompVisible: false,
signTipsCompVisible: false
})
},
// 子组件事件
evtcomp(evt) {
let {
......@@ -44,11 +160,26 @@ Page({
} = evt.detail;
switch (name) {
// 授权完毕
case "_evt_auth_complete":
this.initData();
this.hideMask();
break;
// 通用弹窗组件按钮
case "_evt_common_comp_button":
this.hideMask();
break;
// 去验证
case "_evt_to_verify":
this.hideMask();
this.toVipLogin();
break;
// 隐藏弹窗
case "_evt_hide_mask":
this.hideMask();
break;
default:
......
......@@ -52,6 +52,7 @@ $contentWidth: 690px;
}
.vip {
display: inline-block;
font-size: 24px;
margin-top: 8px;
background: #FF7B21;
......
......@@ -10,20 +10,22 @@
<view class="user-info">
<image class="avatar" mode="aspectFill" src="{{userInfo.avatar}}" />
<view class="wrap1">
<view class="name">{{userInfo.realName}}</view>
<view wx:if="{{userInfo.auditStatus == 'authorization'}}" class="vip vip-check">积分会员</view>
<view wx:else class="vip">未验证 ></view>
<view class="name">{{userInfo.realName ? userInfo.realName : userInfo.nickname}}</view>
<view wx:if="{{userInfo.auditStatus == 'authorization'}}" class="vip vip-check">
积分会员
</view>
<view wx:else class="vip" bindtap="toVipLogin">未验证 ></view>
</view>
</view>
<!-- 右边栏 -->
<view class="user-data">
<view class="wrap">
<view class="t1">1345</view>
<view class="t1">{{userInfo.memberPoints}}</view>
<view class="t2">我的积分</view>
</view>
<view class="line"></view>
<view class="wrap">
<view class="t1">20</view>
<view class="t1">{{userInfo.promotionNum}}</view>
<view class="t2">推广数据</view>
</view>
</view>
......@@ -44,30 +46,18 @@
</view>
<!-- 7天签到 -->
<view class="check">
<view class="check-item check-item-act">
<view class="no">1</view>
<view class="icon">
<image mode="aspectFit" src="../../image/icon/icon-check.png" />
<!-- <image mode="aspectFit" src="../../image/icon/icon-integral.png" /> -->
<!-- <image mode="aspectFit" src="../../image/icon/icon-red-package.png" /> -->
</view>
</view>
<view class="check-item ">
<view class="no">2</view>
<view wx:for="{{signInfo}}" wx:key="{{index}}" class="check-item">
<view class="no">{{index+1}}</view>
<view class="icon">
<image mode="aspectFit" src="../../image/icon/icon-integral.png" />
</view>
</view>
<view class="check-item ">
<view class="no">3</view>
<view class="icon">
<image mode="aspectFit" src="../../image/icon/icon-red-package.png" />
<image wx:if="{{item}}" mode="aspectFit" src="../../image/icon/icon-check.png" />
<image wx:elif="{{index == signInfo.length -1}}" mode="aspectFit" src="../../image/icon/icon-red-package.png" />
<image wx:else mode="aspectFit" src="../../image/icon/icon-integral.png" />
</view>
</view>
</view>
<!-- 签到按钮 -->
<!-- <view class="sign-btn ">签到 (第4天)</view> -->
<view class="sign-btn sign-btn-disable">已签到</view>
<view wx:if="{{userInfo.isSign == 1}}" class="sign-btn sign-btn-disable">已签到</view>
<view wx:else class="sign-btn" bindtap="onSignHandler">签到 (第{{signNum}}天)</view>
</view>
<!-- 订单区 -->
<view class="border order ">
......@@ -105,12 +95,12 @@
<!-- 功能区 -->
<view class="border func">
<view class="my-qrcode">
<image class="qrcode" mode="widthFix" src="../../image/icon/icon-qrcode.png" />
<image bindtap="onMyQrcodeHandler" class="qrcode" mode="widthFix" src="../../image/icon/icon-qrcode.png" />
<view class="t1">我的二维码</view>
</view>
<!-- 功能区 -->
<view class="func-wrap">
<view class="func-wrap-item">
<view bindtap="onRankHandler" class="func-wrap-item">
<view class="icon-wrap">
<image class="icon" mode="aspectFit" src="../../image/icon/icon-integral-rank.png" />
</view>
......@@ -128,7 +118,7 @@
</view>
<view class="txt">我的消息</view>
</view>
<view class="func-wrap-item">
<view bindtap="onContactUsHandler" class="func-wrap-item">
<view class="icon-wrap">
<image class="icon" mode="aspectFit" src="../../image/icon//icon-concat-us.png" />
</view>
......@@ -143,3 +133,9 @@
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
<van-popup show="{{ commonTipsCompVisible }}">
<common-tips-comp bind:evtcomp="evtcomp" inner-title="{{innerTitle}}" inner-text="{{innerText}}"></common-tips-comp>
</van-popup>
<van-popup show="{{ signTipsCompVisible }}">
<sign-tips-comp bind:evtcomp="evtcomp"></sign-tips-comp>
</van-popup>
......
let Date = require('../../utils/date.js');
let Utils = require('../../utils/util.js');
let app = getApp();
Page({
data: {
authorizeVisible: false,
// form start
name: "",
mobile: "",
verifyCode: "",
imageUrl: "",
auth_time: 0,
sendAuthCode: true,
membersShipIndex: 0,
membersShipList: [{
value: "",
label: "请选择",
},
{
value: "总代理",
label: "总代理",
},
{
value: "经销商",
label: "经销商",
},
{
value: "专业电工",
label: "专业电工",
},
{
value: "其他用户",
label: "其他用户",
}
],
maxImg: 1, // 上传数量
files: [], // 上传文件列表
// provinceId: "",
// cityId: "",
// provinceList: [],
// cityList: [],
// form end
},
onShareAppMessage() {},
showAuth() {
......@@ -9,5 +48,235 @@ Page({
authorizeVisible: true
})
},
onLoad(options) {}
onLoad(options) {
this.initData();
},
initData() {
},
/**
* 会员身份
*/
onSelectMembersShipHandler() {
},
// getProvince() {
// return new Promise((resolve, reject) => {
// app.post({
// mode: "custom",
// url: app.api.provinceQuery
// }).then((result) => {
// this.setData({
// provinceList: result
// })
// console.log("provinceList:",result);
// })
// });
// },
// getCity() {
// return new Promise((resolve, reject) => {
// app.post({
// url: app.api.cityQuery,
// data: {
// parentId: this.data.provinceId
// }
// }).then((result) => {
// this.setData({
// cityList: result
// })
// })
// });
// },
/**
* 参考 contact-table同名方法
* 提交表单
*
*/
onSubmitHandler() {
let {
name,
phone,
verifyCode,
files
} = this.data;
app.router.push({
path: "vipVerify"
})
},
/**
* 调起微信图片上传
*/
onUploadHandler() {
let _this = this;
let count = _this.data.maxImg - _this.data.length;
wx.chooseImage({
sizeType: ['original', 'compressed'],
sourceType: ['album'],
count: 1,
success(res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFiles = res.tempFiles
let maxImg = _this.data.maxImg;
let files = _this.data.files;
files = files.concat(tempFiles);
if (files.length > maxImg) {
files.splice(0, maxImg);
}
_this.setData({
files
});
console.log("files:", files);
console.log("files[0]:", files[0]);
}
})
},
/**
* 上传到自定义服务器
* urlList 需要上传的图片地址
*/
uploadToCustomService(urlList) {
let _this = this;
return new Promise((resolve, reject) => {
// promise列表
let p = [];
// 用promise上传音频
urlList.forEach(element => {
let myPromise = new Promise((resolve2, reject2) => {
_this.uploadfileMultiple(element).then((result2) => {
resolve2(result2)
}).catch((err) => {
// _this.tip("声音上传失败")
reject2();
});
});
p.push(myPromise);
});
Promise.all(p).then(uploadFiles => {
resolve(uploadFiles)
}, reason => {
reject();
});
});
},
/**
* 多文件上传
* @param {*} filePath
*/
uploadfileMultiple(filePath) {
let _this = this;
return new Promise((resolve, reject) => {
wx.uploadFile({
url: app.config.NET_CONFIG.commonApi + app.api.uploadFile,
filePath: filePath,
name: 'file',
// header: {}, // 设置请求的 header
header: {
'content-type': 'multipart/form-data'
},
formData: {
path: '/weapp/zhiliang-light/'
},
// HTTP 请求中其他额外的 form data
success(res) {
let result = JSON.parse(res.data).content;
resolve(result);
},
fail() {
reject()
},
complete: function () {}
})
});
},
// 获取验证码
reqGetSmsRequest() {
if (!this.data.sendAuthCode) return;
let mobile = this.data.mobile
if (!mobile || !Utils.checkMobile(mobile)) {
this.showLog("请输入正确的手机号码");
return
}
this.getAuthCode();
app.post({
url: app.api.memberPhone,
data: {
picVerifyCode: "",
mobile: mobile,
forRegister: 1
}
}).then((result) => {
wx.showToast({
title: "短信发送成功",
icon: "none"
})
});
},
// 倒数
getAuthCode() {
let _this = this;
_this.setData({
sendAuthCode: false,
auth_time: 60
})
var auth_timetimer = setInterval(() => {
_this.setData({
auth_time: _this.data.auth_time - 1
})
if (_this.data.auth_time <= 0) {
_this.setData({
sendAuthCode: true
});
clearInterval(auth_timetimer)
}
}, 1000)
},
bindMobileInput(e) {
this.setData({
"mobile": e.detail.value
})
},
bindNameInput(e) {
this.setData({
name: e.detail.value
})
},
bindVerifyCodeInput(e) {
this.setData({
verifyCode: e.detail.value
})
},
bindMembersShipChange(e) {
let index = e.detail.value;
this.setData({
membersShipIndex: index
})
},
hideMask() {
// this.setData({
// productDetailVisible: false
// })
},
// 子组件事件
evtcomp(evt) {
let {
name,
data
} = evt.detail;
switch (name) {
case "_evt_hide_mask":
break;
default:
break;
}
},
})
......
{
"navigationBarTitleText": "more"
"navigationBarTitleText": "会员信息验证"
}
......
......@@ -2,17 +2,128 @@
@import '../../assets/scss/utils';
.page {
.bgc {}
padding-bottom: $pageBottom;
.bgc {
background-color: #f0f0f0;
}
.bg {}
.main {
.top-space {
height: 0px;
height: 40px;
}
.content {
position: relative;
// 表单
.form {
&-item {
@extend .bb;
padding: 24px 30px;
background: #fff;
font-size: 28px;
display: flex;
align-items: center;
margin-bottom: 20px;
.label {
min-width: 150px;
}
.cont {
flex: 1;
@extend .bb;
padding-left: 20px;
}
.address {
display: flex;
.area {
width: 220px;
color: #333333;
@include ellipsis(1);
}
.line {
width: 2px;
height: 40px;
background: #D8D8D8;
margin: 0 40px;
}
}
.exts {
@extend .fcc;
@extend .bb;
// padding: 20px 0px 20px 20px;
.icon {
width: 16px;
height: 28px;
}
.code {
font-size: 28px;
color: #3680EB;
}
}
}
&-item-textarea {
align-items: flex-start;
.cont {
margin-top: 4px;
height: auto;
min-height: 120px;
}
}
}
// 上传
.upload {
background: #fff;
&-tit {
@extend .bb;
padding: 24px 30px;
font-size: 24px;
color: #666666;
}
&-wrap {
display: flex;
justify-content: space-between;
@extend .bb;
padding: 32px 66px 66px;
&-item {
text-align: center;
.image {
width: 240px;
height: 152px;
}
.tips {
font-size: 24px;
color: #666666;
margin-top: 24px;
}
}
}
}
// 提交按钮
.submit-btn {
@include cb(320px, 84px);
margin: 40px auto 0;
}
}
}
}
......
......@@ -3,9 +3,68 @@
<view class="app__bg bg"></view>
<view class="app__content main">
<view class="top-space"></view>
<view class="content"></view>
<view class="content">
<view class="table">
<!-- 表单 -->
<view class="form">
<view class="form-item">
<view class="label">真实姓名</view>
<input class="cont" value="{{name}}" bindinput="bindNameInput" placeholder="请输入" />
</view>
<picker value="{{membersShipIndex}}" range="{{membersShipList}}" range-key="label" bindchange="bindMembersShipChange">
<view class="form-item">
<view class="label">会员身份</view>
<!-- <input class="cont" placeholder="请输入" /> -->
<span class="cont">
{{membersShipList[membersShipIndex].label ? membersShipList[membersShipIndex].label : '请选择'}}
</span>
<view class="exts" bindtap="onSelectMembersShipHandler" data-data="{{contactInfo.contactTel}}">
<image class="icon" mode="aspectFit" src="../../image/icon/icon-arrow-right.png" />
</view>
</view>
</picker>
<view class="form-item">
<view class="label">区域</view>
<view class="cont address">
<view class="area">省份</view>
<view class="line"></view>
<view class="area">城市</view>
</view>
</view>
<view class="form-item">
<view class="label">手机号码</view>
<input class="cont" value="{{mobile}}" bindinput="bindMobileInput" type="number" placeholder="请输入" />
</view>
<view class="form-item">
<view class="label">验证码</view>
<input class="cont" bindinput="bindVerifyCodeInput" type="number" placeholder="请输入" />
<view value="{{verifyCode}}" class="exts" bindtap="onSelectMembersShipHandler" data-data="{{contactInfo.contactTel}}">
<view bindtap="reqGetSmsRequest" class="code">
{{sendAuthCode ? "获取验证码": auth_time+"(s)"}}
</view>
</view>
</view>
</view>
<!-- 上传 -->
<view class="upload">
<view class="upload-tit">请上传身份证或电工证,审核后,可签到及兑换积分</view>
<view class="upload-wrap">
<view class="upload-wrap-item">
<image class="image" bindtap="onUploadHandler" mode="aspectFit" src="{{files[0] && files[0].path?files[0].path:'../../image/icon/icon-plus.png'}}" />
<view class="tips">身份证正面</view>
</view>
<view class="upload-wrap-item">
<image class="image" mode="aspectFit" src="../../image/icon/icon-id-card.png" />
<view class="tips">示例</view>
</view>
</view>
</view>
<!-- 提交按钮 -->
<view class="submit-btn" bindtap="onSubmitHandler">确认提交</view>
</view>
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}" >
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
......
{
"navigationBarTitleText": "more"
"navigationBarTitleText": "会员信息验证"
}
......
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
.page {
padding-bottom: $pageBottom;
color: #333333;
.bgc {}
.bg {}
.main {
.top-space {
height: 0px;
height: 100px;
}
.content {
position: relative;
.tit {
text-align: center;
font-size: 44px;
color: #333333;
}
.form {
margin: 80px auto 0;
font-size: 28px;
&-item {
font-size: 28px;
display: flex;
margin: 0 auto 16px;
.label {
width: 120px;
color: #666666;
}
.val {
flex: 1;
@extend .bb;
padding-left: 20px;
}
}
.id-card {
margin: 44px 0 0;
// width: 338px;
// height: 226px;
&-image {
width: 338px;
height: 226px;
}
}
.error-tips {
text-align: center;
margin: 40px 0 0;
height: 68px;
line-height: 68px;
background: rgba($color: #E02020, $alpha: 0.1);
color: #E02020;
}
}
.btn-wrap {
.btn {
@include cb(320px, 84px);
margin: 120px auto 0;
}
}
}
}
}
.border {
padding: 40px 30px;
}
......
......@@ -3,9 +3,37 @@
<view class="app__bg bg"></view>
<view class="app__content main">
<view class="top-space"></view>
<view class="content"></view>
<view class="content">
<view class="tit">信息审核中,请耐心等待</view>
<view class="border form">
<view class="form-item">
<view class="label">真实姓名</view>
<view class="val">xxx</view>
</view>
<view class="form-item">
<view class="label">会员身份</view>
<view class="val">专业电工</view>
</view>
<view class="form-item">
<view class="label">地区</view>
<view class="val">广东省深圳市</view>
</view>
<view class="form-item">
<view class="label">手机号码</view>
<view class="val">15012341234</view>
</view>
<view class="id-card">
<image class="id-card-image" mode="aspectFit" src="../../image/icon/icon-id-card-default.png" />
</view>
<view class="error-tips">失败原因:证件不符</view>
</view>
<view class="btn-wrap">
<view wx:if="{{1>0}}" class="btn">修改信息</view>
<view wx:else class="btn">重新提交</view>
</view>
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}" >
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
......