f9be83eb by simon

默认提交

1 parent 7d291166
# chmod u+x git.sh
unset msg
read -p "请输入commit提交的描述: " msg
if [[ $msg == "" ]]; then
msg="默认提交"
fi
git add -A
git commit -m $msg
git push
git status
......@@ -124,3 +124,8 @@
background-color: #3680EB;
}
@mixin app-width() {
width: 750px;
}
......
......@@ -41,13 +41,20 @@
}
}
.btn {
@include cb(300px, 80px);
.btn-wrap {
position: absolute;
left: 0;
right: 0;
bottom: 80px;
margin: 0 auto;
display: flex;
justify-content: center;
}
.btn {
@include cb(240px, 80px);
margin: 0 24px;
}
}
......
......@@ -6,8 +6,11 @@
</view> -->
<view class="tit">深士照明</view>
<view class="tips">
<text >需要获取您的微信昵称等信息才可以获取积分和兑换奖品哦</text>
<text>需要获取您的微信昵称等信息才可以获取积分和兑换奖品哦</text>
</view>
</view>
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button>
<view class="btn-wrap">
<button class="btn gray" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button>
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button>
</view>
</view>
......
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
.page {
position: relative;
overflow: hidden;
.bgc {
// background-color: transparent;
// background-color: black;
background-color: #fafafc;
.bgc {}
.bg {
@include app-width;
image {
@include app-width;
}
}
// 右下角图标背景内容补充
.br-wrap {
$brWidth: 168px;
$brHeight: 172px;
width: $brWidth;
height: $brHeight;
position: fixed;
bottom: 0;
right: 0;
background-color: transparent;
image {
width: $brWidth;
height: $brHeight;
}
}
.main {
.main {
position: relative;
min-height: 1206px;
.top-space {
height: 60px;
.content {
position: relative;
}
.login-wrap {
padding-top: 886px;
.login {
position: relative;
width: 650px;
margin: 0 auto;
text-align: center;
.terms-wrap {
margin-top: 24px;
display: flex;
justify-content: center;
margin-bottom: 16px;
font-size: 28px;
color: #333333;
&-logo {
width: 140px;
height: 140px;
}
.terms {
text-align: center;
padding: 0 12px;
&-name {
margin-top: 32px;
font-size: 32px;
color: #333333;
.t1 {
color: #4bc2ed;
display: inline-block;
}
}
}
&-line {
margin-top: 70px;
width: 650px;
height: 2px;
background-color: #eaeaec;
.login-btn {
width: 340px;
height: 80px;
line-height: 80px;
border-radius: 40px;
border: solid 3px #4bc2ed;
margin: 0 auto;
font-size: 36px;
color: #4bc2ed;
text-align: center;
background-color: transparent;
}
&-title {
margin-top: 40px;
font-size: 32px;
text-align: left;
color: #333333;
.gray {
color: #8f8f8f;
border-color: #8f8f8f;
}
}
}
}
&-tips {
margin-top: 28px;
font-size: 26px;
text-align: left;
color: #666666;
}
.space1 {
height: 116px;
}
&-btn {
margin-top: 102px;
width: 650px;
height: 90px;
line-height: 90px;
border-radius: 8px;
background-color: #00c200;
font-size: 32px;
color: #ffffff;
}
.terms-cont {
width: 690px;
height: 1000px;
position: relative;
background-color: #fff;
.cont {
position: relative;
width: 690px;
height: 900px;
overflow: auto;
padding: 28px;
@extend .bb;
font-size: 24px;
.tit {
text-align: center;
font-size: 32px;
font-weight: bold;
}
.desc {}
.t1 {
color: #4bc2ed;
display: inline-block;
margin-top: 16px;
}
}
.btn {
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
}
......
......@@ -33,7 +33,7 @@ Page({
// })
this.queryMember().then((result) => {
this.setData({
name:result.nickname
name: result.nickname
})
});
},
......@@ -100,13 +100,13 @@ Page({
})
return;
}
if (pics.length <= 0) {
wx.showToast({
title: "请上传图片",
icon: 'none'
})
return;
}
// if (pics.length <= 0) {
// wx.showToast({
// title: "请上传图片",
// icon: 'none'
// })
// return;
// }
// 上传图片到服务器
......@@ -118,7 +118,7 @@ Page({
name: name,
phone: phone,
messageContant: messageContant,
images: result.join(','),
images: result && result.length > 0 ? result.join(',') : "",
}
}).then((result2) => {
this.setData({
......@@ -135,25 +135,26 @@ Page({
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();
if (urlList && urlList.length > 0) {
let p = [];
urlList.forEach(element => {
let myPromise = new Promise((resolve2, reject2) => {
_this.uploadfileMultiple(element).then((result2) => {
resolve2(result2)
}).catch((err) => {
reject2();
});
});
p.push(myPromise);
});
p.push(myPromise);
});
Promise.all(p).then(uploadFiles => {
resolve(uploadFiles)
}, reason => {
reject();
});
Promise.all(p).then(uploadFiles => {
resolve(uploadFiles)
}, reason => {
reject();
});
} else {
resolve([]);
}
});
},
/**
......
......@@ -15,13 +15,13 @@
<view class="label">生产地址</view>
<text class="val">{{contactInfo.contactCompany}}</text>
</view>
<view class="form-item">
<!-- <view class="form-item">
<view class="label">电话</view>
<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> -->
<view class="form-item">
<view class="label">手机</view>
<text class="val">{{contactInfo.contactPhone}}</text>
......
......@@ -142,6 +142,12 @@ Page({
this.hideMask();
break;
// 授权完毕
case "_evt_auth_complete":
this.resetPage();
this.queryProduct();
break;
default:
break;
}
......
......@@ -18,7 +18,6 @@ Page({
userInfo: {}, //用户信息
code: "", // 手输入码 / 扫出的积分码
memberCode: "", // 扫出的用户码
// integralCode: "", // 扫出的积分码
},
onShareAppMessage() {},
showAuth() {
......@@ -28,17 +27,19 @@ Page({
},
onLoad(options) {
let q = decodeURIComponent(options.q);
// 获取会员码
let m = getQueryByUrl("m", q);
// 获取积分码
let c = getQueryByUrl("c", q);
if (q) {
// 获取会员码
let m = getQueryByUrl("m", q);
// 设置会员码
if (m) {
this.setData({
memberCode: m
})
}
// 获取积分码
let c = getQueryByUrl("c", q);
// 设置积分码
if (c) {
this.setData({
code: c
......@@ -48,7 +49,9 @@ Page({
this.queryProduct();
this.queryBanner();
this.initData();
if (m || c) {
this.initData();
}
},
onShow() {
......@@ -63,15 +66,16 @@ Page({
} = this.data;
// 如果存在扫码参数,则需要拉用户身份(未授权的情况下 要拉授权)
this.queryMember().then((result) => {
// 扫用户码
this.queryScanPersonQrcode().then((result2) => {
// 查询积分码
if (code) {
this.onSearchHandler();
this.querySearchIntegralQrcode();
}
});
});
},
// 到达底部
onReachBottom() {
if (this.data.productList.length < this.data.total) {
......@@ -147,7 +151,7 @@ Page({
},
/**
* 扫个人码
* 扫个人码 做任务,用户无感知
* 如果没有码,直接返回
*/
queryScanPersonQrcode() {
......@@ -171,21 +175,38 @@ Page({
});
},
/**
* 点击详情
* 请求积分码
* 通过搜索查询
*/
onProductItemHandler(evt) {
let curProductDetail = getBindtapData(evt);
querySearchIntegralQrcode() {
let code = this.data.code;
this.setData({
curProductDetail: curProductDetail,
productDetailVisible: true
code: ""
})
if (code.length != 16) {
wx.showModal({
content: '请输入16位积分码',
showCancel: false,
success(res) {}
})
return;
}
app.router.push({
path: "scanResult",
query: {
code: code
}
})
},
/**
* 点击扫码按钮
* 请求积分码
* 通过扫码
*/
onScanHandler() {
queryScanIntegralQrcode() {
let _this = this;
wx.scanCode({
onlyFromCamera: true,
......@@ -222,36 +243,59 @@ Page({
}
},
fail(err) {
console.log("err:", err);
let isCancel = err.errMsg.indexOf("cancel") != -1;
if (!isCancel) {
wx.showModal({
content: '未发现积分码,换一个二维码试试',
showCancel: false,
success(res) {}
})
}
}
})
},
/**
* 点击搜索
* 点击详情
*/
onSearchHandler() {
let code = this.data.code;
onProductItemHandler(evt) {
let curProductDetail = getBindtapData(evt);
this.setData({
code: ""
curProductDetail: curProductDetail,
productDetailVisible: true
})
if (code.length != 16) {
wx.showModal({
content: '请输入16位积分码',
showCancel: false,
success(res) {}
})
},
/**
* 点击扫码按钮
*/
onScanHandler() {
if (!this.data.userInfo.memberCode) {
this.queryMember().then((result) => {
this.queryScanIntegralQrcode();
});
return;
} else {
this.queryScanIntegralQrcode();
}
app.router.push({
path: "scanResult",
query: {
code: code
}
})
},
/**
* 点击查询按钮
*/
onSearchHandler() {
if (!this.data.userInfo.memberCode) {
this.queryMember().then((result) => {
this.querySearchIntegralQrcode();
});
} else {
this.querySearchIntegralQrcode();
}
},
/**
* 绑定手输code
* @param {*} e
*/
......
......@@ -48,16 +48,6 @@
</view>
</view>
<!-- 7天签到 -->
<!-- <view class="check">
<view wx:for="{{signInfo}}" wx:key="{{index}}" class="check-item {{item ? 'check-item-act' :''}}">
<view class="no">{{index+1}}</view>
<view class="icon">
<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="check">
<view wx:for="{{signInfo}}" wx:key="{{index}}" class="check-item {{item ? 'check-item-act' :''}}">
<view wx:if="{{index != 0}}" class="line"></view>
......
......@@ -9,6 +9,7 @@ Page({
authorizeVisible: false,
// form start
name: "",
shopName: "",
mobile: "",
verifyCode: "",
imageUrl: "",
......@@ -27,6 +28,7 @@ Page({
memberTypeName: "", // label
memberTypeCode: "", // 码
// form end
isModify: false,
},
onShareAppMessage() {},
showAuth() {
......@@ -35,6 +37,9 @@ Page({
})
},
onLoad(options) {
this.setData({
isModify: options && options.type == "modify"
})
this.initData();
},
initData() {
......@@ -149,12 +154,7 @@ Page({
return new Promise((resolve, reject) => {
let {
name,
// membersShipIndex,
// membersShipList,
// provinceList,
// provinceIndex,
// cityList,
// cityIndex,
shopName,
memberTypeCode,
province,
city,
......@@ -162,9 +162,6 @@ Page({
verifyCode,
files
} = this.data;
// let memberTypeCode = membersShipList[membersShipIndex].memberTypeCode;
// let province = provinceList[provinceIndex] && provinceList[provinceIndex].areaName || "";
// let city = cityList[cityIndex] && cityList[cityIndex].areaName || "";
let pics = [];
files.forEach(element => {
pics.push(element.path)
......@@ -208,12 +205,7 @@ Page({
onSubmitHandler() {
let {
name,
// membersShipIndex,
// membersShipList,
// provinceList,
// provinceIndex,
// cityList,
// cityIndex,
shopName,
memberTypeCode,
province,
city,
......@@ -221,9 +213,6 @@ Page({
verifyCode,
files
} = this.data;
// let memberTypeCode = membersShipList[membersShipIndex].memberTypeCode;
// let province = provinceList[provinceIndex] && provinceList[provinceIndex].areaName || "";
// let city = cityList[cityIndex] && cityList[cityIndex].areaName || "";
let pics = [];
files.forEach(element => {
pics.push(element.path)
......@@ -234,6 +223,7 @@ Page({
this.uploadToCustomService(pics).then((result) => {
let verifyInfo = {
realName: name,
storeName: shopName,
province: province,
city: city,
phone: mobile,
......@@ -241,7 +231,6 @@ Page({
memberTypeCode: memberTypeCode,
images: result[0]
}
// app.globalData.verifyInfo = verifyInfo;
app.post({
url: app.api.memberIdCommit,
......@@ -260,6 +249,8 @@ Page({
* 调起微信图片上传
*/
onUploadHandler() {
console.log("this.options.type:", this.options.type);
if (this.options.type == "modify") return; //修改模式不让改图片
let _this = this;
let count = _this.data.maxImg - _this.data.length;
wx.chooseImage({
......@@ -424,6 +415,11 @@ Page({
name: e.detail.value
})
},
bindShopNameInput(e) {
this.setData({
shopName: e.detail.value
})
},
bindVerifyCodeInput(e) {
this.setData({
verifyCode: e.detail.value
......
......@@ -41,6 +41,7 @@
.address {
display: flex;
.area {
width: 220px;
color: #333333;
......@@ -124,6 +125,21 @@
@include cb(320px, 84px);
margin: 40px auto 0;
}
.submit-tips {
margin: 12px 0;
width: 100%;
color: #333333;
text-align: center;
line-height: 24px;
.text {
font-size: 20px;
}
}
}
}
.modify{
color: #888888 !important;
}
}
......
......@@ -9,25 +9,29 @@
<view class="form">
<view class="form-item">
<view class="label">真实姓名</view>
<input class="cont" value="{{name}}" bindinput="bindNameInput" placeholder="请输入" />
<input disabled="{{isModify}}" class="cont {{isModify ? 'modify' :''}}" value="{{name}}" bindinput="bindNameInput" placeholder="请输入" />
</view>
<picker value="{{membersShipIndex}}" range="{{membersShipList}}" range-key="memberTypeName" bindchange="bindMembersShipChange">
<view class="form-item">
<view class="label">店名</view>
<input disabled="{{isModify}}" class="cont {{isModify ? 'modify' :''}}" value="{{shopName}}" bindinput="bindShopNameInput" placeholder="选填" />
</view>
<picker disabled="{{isModify}}" value="{{membersShipIndex}}" range="{{membersShipList}}" range-key="memberTypeName" bindchange="bindMembersShipChange">
<view class="form-item">
<view class="label">会员身份</view>
<span class="cont">{{memberTypeName || '请选择'}}</span>
<span class="cont {{isModify ? 'modify' :''}}">{{memberTypeName || '请选择'}}</span>
<view class="exts" 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="label">销售区域</view>
<view class="cont address">
<picker class="area" bindchange="bindPickerChangeProvince" value="{{provinceIndex}}" range="{{provinceList}}" range-key="areaName">
<picker disabled="{{isModify}}" class="area {{isModify ? 'modify' :''}}" bindchange="bindPickerChangeProvince" value="{{provinceIndex}}" range="{{provinceList}}" range-key="areaName">
{{province || '省'}}
</picker>
<view class="line"></view>
<picker class="area" bindchange="bindPickerChangeCity" value="{{cityIndex}}" range="{{cityList}}" range-key="areaName">
<picker disabled="{{isModify}}" class="area {{isModify ? 'modify' :''}}" bindchange="bindPickerChangeCity" value="{{cityIndex}}" range="{{cityList}}" range-key="areaName">
{{city || '市'}}
</picker>
</view>
......@@ -39,7 +43,7 @@
<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 value="{{verifyCode}}" class="exts">
<view bindtap="reqGetSmsRequest" class="code">
{{sendAuthCode ? "获取验证码": auth_time+"(s)"}}
</view>
......@@ -62,6 +66,9 @@
</view>
<!-- 提交按钮 -->
<view class="submit-btn" bindtap="onSubmitHandler">确认提交</view>
<view class="submit-tips">
<text class="text">五金分销商请上传营业执照,其他用户上传身份证或电工证\n审核后可参与签到及兑换积分</text>
</view>
</view>
</view>
</view>
......
......@@ -54,7 +54,10 @@ Page({
onModifyHandler() {
app.router.push({
openType: "redirect",
path: "vipLogin"
path: "vipLogin",
query: {
type: "modify"
}
});
},
......