pull/1/head
liudan 1 year ago
parent 0b6c75cc33
commit 8c8ab9d5a0
  1. 4
      common/config.js
  2. 13
      pages/Information/Information.vue
  3. 2
      pages/my/my.vue
  4. 15
      pages/shoukuan/shoukuan.scss
  5. 192
      pages/shoukuan/shoukuan.vue
  6. BIN
      static/image/up_img.png
  7. 2
      unpackage/dist/build/h5/index.html
  8. BIN
      unpackage/dist/build/h5/static/image/up_img.png
  9. 2
      unpackage/dist/build/h5/static/js/index.52d06a89.js
  10. 1
      unpackage/dist/build/h5/static/js/pages-Information-Information.a6b669be.js
  11. 1
      unpackage/dist/build/h5/static/js/pages-Information-Information.e75b6ca4.js
  12. 1
      unpackage/dist/build/h5/static/js/pages-my-my.05002ed5.js
  13. 1
      unpackage/dist/build/h5/static/js/pages-my-my.bf8b8dd8.js
  14. 1
      unpackage/dist/build/h5/static/js/pages-shoukuan-shoukuan.c76e60cc.js
  15. 1
      unpackage/dist/build/h5/static/js/pages-shoukuan-shoukuan.e2581164.js

@ -1,2 +1,2 @@
export const $apiLinks = "http://qg2.njrenzhou.cn/" // api 接口地址 export const $apiLinks = "https://qg2.njrenzhou.cn/" // api 接口地址
export const baseUrl = "http://qg2.njrenzhou.cn/" export const baseUrl = "https://qg2.njrenzhou.cn/"

@ -59,7 +59,7 @@
onLoad(option) { onLoad(option) {
this.nickname = option.name this.nickname = option.name
this.avatarUrl = option.avatar this.avatarUrl = option.avatar
console.log(option)
}, },
methods:{ methods:{
uploadAvatar(){ uploadAvatar(){
@ -79,10 +79,13 @@
}) })
for (let i = 0; i < lists.length; i++) { for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url) const result = await this.uploadFilePromise(lists[i].url)
console.log(result,"===")
this.avatarUrl = JSON.parse(result).data.fullurl; this.avatarUrl = JSON.parse(result).data.fullurl;
this.avatarUrl_short = JSON.parse(result).data.url; this.avatarUrl_short = JSON.parse(result).data.url;
updateUserInfo({avatar:this.avatarUrl}).then(res=>{
this.$refs.uToast.show({
message:'修改头像成功'
})
})
} }
}, },
@ -99,7 +102,7 @@
formData: { formData: {
}, },
success: (res) => { success: (res) => {
console.log(res)
if(JSON.parse(res.data).code==1){ if(JSON.parse(res.data).code==1){
setTimeout(() => { setTimeout(() => {
this.finishImageList.push({url:JSON.parse(res.data).data.fullurl,path:JSON.parse(res.data).data.url}) this.finishImageList.push({url:JSON.parse(res.data).data.fullurl,path:JSON.parse(res.data).data.url})
@ -130,7 +133,7 @@
animation: 0 animation: 0
}).then((res)=>{ }).then((res)=>{
this.nickname = res.value; this.nickname = res.value;
console.log(res)
updateUserInfo({nickname:res.value}).then(res=>{ updateUserInfo({nickname:res.value}).then(res=>{
this.$refs.uToast.show({ this.$refs.uToast.show({
message:'修改成功' message:'修改成功'

@ -26,7 +26,7 @@
<view class="nickname"> <view class="nickname">
<!-- <image src="/static/rank.png"></image> <!-- <image src="/static/rank.png"></image>
<text>{{userInfo.score}}</text> --> <text>{{userInfo.score}}</text> -->
<text>{{userInfo.mobile}}</text> <text>{{userInfo.mobile.replace(/^(\d{3})\d{4}(\d{4})/,'$1****$2')}}</text>
</view> </view>
</view> </view>
<u-icon name="arrow-right" color="#236030" class="right"></u-icon> <u-icon name="arrow-right" color="#236030" class="right"></u-icon>

@ -119,7 +119,16 @@
} }
} }
} }
/deep/.u-upload__button{ .zfb{
border:1px solid #aaa; text-align: center;
margin:30rpx auto; image{
width:200rpx;
height:200rpx;
margin:100rpx auto;
}
.mesInfo{
margin-top: 26rpx;
font-size: 26rpx;
color: #999;
}
} }

@ -47,23 +47,34 @@
<view class="zfb" v-show="activeIndex==2"> <view class="zfb" v-show="activeIndex==2">
<u-upload <u-upload
:fileList="zfbPic" :fileList="zfbPic"
:previewFullImage="true" :previewFullImage="false"
@afterRead="" @afterRead="afterRead"
:maxCount="1" width="176" height="176" width="176" height="176"
style="display: none;"
ref="uploadzfb"
name="1" name="1"
multiple
></u-upload> ></u-upload>
<image :src="zfburl" v-if="zfburl" mode="" @click="uploadZfb"></image>
<image src="/static/image/up_img.png" v-else mode="" @click="uploadZfb"></image>
</view> </view>
<view class="zfb" v-show="activeIndex==3"> <view class="zfb" v-show="activeIndex==3">
<u-upload <u-upload
:fileList="zfbPic" :fileList="wxPic"
:previewFullImage="true" :previewFullImage="false"
@afterRead="" @afterRead="afterRead"
:maxCount="1" width="176" height="176" width="176" height="176"
name="1" style="display: none;"
multiple ref="uploadwx"
name="2"
></u-upload> ></u-upload>
<image :src="wxurl" mode="" v-if="wxurl" @click="uploadwx"></image>
<image src="/static/image/up_img.png" mode="" v-else @click="uploadwx"></image>
<view class="mesInfo">
微信收款码上传后将无法修改请认真上传
</view>
</view> </view>
<view class="yhk"> <view class="yhk">
<view class="list-input"> <view class="list-input">
@ -71,7 +82,7 @@
<text>手机号</text> <text>手机号</text>
</view> </view>
<view class="content"> <view class="content">
<input type="text" v-model="mobileForm.phone" placeholder="请输入手机号"> <input type="text" disabled v-model="mobileForm.simplephone" placeholder="请输入手机号">
</view> </view>
</view> </view>
<view class="list-input"> <view class="list-input">
@ -81,7 +92,7 @@
<view class="content"> <view class="content">
<input type="text" v-model="mobileForm.code" placeholder="请输入验证码"> <input type="text" v-model="mobileForm.code" placeholder="请输入验证码">
</view> </view>
<view class="yzmBtn" v-show="!codeSend"> <view class="yzmBtn" v-show="!codeSend" @click="getCode">
获取验证码 获取验证码
</view> </view>
<view class="yzmBtn" v-show="codeSend"> <view class="yzmBtn" v-show="codeSend">
@ -89,7 +100,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="saveBtn"> <view class="saveBtn" :style="issave?'opacity:1':'opacity:0.4'" @click="issave?submitSave():''">
{{activeIndex==1?'保存银行卡':activeIndex==2?'保存支付宝二维码':activeIndex==3?'保存微信二维码':''}} {{activeIndex==1?'保存银行卡':activeIndex==2?'保存支付宝二维码':activeIndex==3?'保存微信二维码':''}}
</view> </view>
@ -100,7 +111,8 @@
</template> </template>
<script> <script>
import {updateUserInfo,smsSend} from '@/common/api.js' import {getToken} from '@/common/auth.js'
import {updateUserInfo,smsSend,getUserInfo,smsCheck} from '@/common/api.js'
export default { export default {
data() { data() {
return { return {
@ -124,28 +136,53 @@
codeSend:false, codeSend:false,
timeNum:59, timeNum:59,
timer:null, timer:null,
fileList1:[],
fileList2:[],
zfbPic:[], zfbPic:[],
zfburl:'',
wxPic:[],
wxurl:'',
mobileForm:{ mobileForm:{
phone: '', phone: '',
simplephone:'',
code: '', code: '',
} },
issave:false,
}; };
}, },
onLoad(option) { onLoad(option) {
this.getUserInfoHandle()
}, },
methods:{ methods:{
//
getUserInfoHandle(){
getUserInfo().then(res=>{
this.mobileForm.phone =res.data.mobile
this.mobileForm.simplephone=this.mobileForm.phone.replace(/^(\d{3})\d{4}(\d{4})/,'$1****$2')
Object.keys(this.yhk).forEach(item=>{
this.yhk[item] = res.data[item]
})
this.zfburl = res.data.alipay_image;
this.wxurl = res.data.wechat_image;
})
},
getPay(item){ getPay(item){
this.activeIndex = item.id this.activeIndex = item.id;
clearInterval(this.timer);
this.mobileForm.code='';
this.timeNum = 59;
this.codeSend = false;
}, },
getCode(){ getCode(){
// let event = this.activeIndex==1?'bank':this.activeIndex==2?'alipay':'wechat'
if(!this.mobileForm.phone){ if(!this.mobileForm.phone){
this.$refs.uToast.show({ this.$refs.uToast.show({
message:'请输入手机号码' message:'请输入手机号码'
}) })
return; return;
} }
smsSend({mobile:this.mobileForm.phone}).then(res=>{ smsSend({mobile:this.mobileForm.phone,event:'notice'}).then(res=>{
if(res.code==1){ if(res.code==1){
this.codeSend = true; this.codeSend = true;
this.timer = setInterval(()=>{ this.timer = setInterval(()=>{
@ -160,11 +197,128 @@
} }
}) })
}, },
submitSave(){
if(!this.mobileForm.code){
this.$refs.uToast.show({
message:'请输入验证码'
})
return;
}
smsCheck({mobile:this.mobileForm.phone,captcha:this.mobileForm.code,event:'notice'}).then(res=>{
if(res.code==1){
if(this.activeIndex==1){
updateUserInfo(this.yhk).then(res=>{
console.log(res,"999")
})
}else if(this.activeIndex==2){
updateUserInfo({alipay_image:this.zfburl}).then(res=>{
console.log(res,"999zfb")
})
}else if(this.activeIndex==3){
updateUserInfo({wechat_image:this.wxurl}).then(res=>{
console.log(res,"999wx")
})
}
}
})
},
uploadZfb(){
this.$refs.uploadzfb.chooseFile()
},
uploadwx(){
this.$refs.uploadwx.chooseFile()
},
//
async afterRead(event) {
console.log(event)
// multiple true , file
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
if(event.name==1){
this.zfburl = JSON.parse(result).data.fullurl;
}else{
this.wxurl = JSON.parse(result).data.fullurl;
}
}
},
//
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: this.baseUrl+'api/common/upload',
filePath: url,
name: 'file',
header:{
token:getToken()
},
formData: {
},
success: (res) => {
if(JSON.parse(res.data).code==1){
setTimeout(() => {
// this.finishImageList.push({url:JSON.parse(res.data).data.fullurl,path:JSON.parse(res.data).data.url})
resolve(res.data)
}, 1000)
}else{
uni.$u.toast(JSON.parse(res.data).msg)
resolve(res.data)
}
},
fail: (res) => {
console.log(res,"rrr")
}
});
})
},
}, },
destroyed() { destroyed() {
clearInterval(this.timer) clearInterval(this.timer)
this.timer = null; this.timer = null;
}, },
watch:{
activeIndex:{
handler(newValue, oldValue) {
if(newValue==1){
if(this.yhk.bank_realname && this.yhk.bank_mobile && this.yhk.bank_no && this.yhk.bank_address){
this.issave = true;
}else{
this.issave = false;
}
}else if(newValue==2){
this.issave = true;
}else if(newValue==3){
this.issave = true;
}
}
},
yhk:{
handler(newValue, oldValue) {
if(newValue.bank_realname && newValue.bank_mobile && newValue.bank_no && newValue.bank_address){
this.issave = true;
}else{
this.issave = false;
}
},
deep: true
}
}
} }
</script> </script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>商城</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>商城</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.97465e7b.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.fd0c9014.js></script><script src=/static/js/index.f43f9137.js></script></body></html> document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.97465e7b.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.fd0c9014.js></script><script src=/static/js/index.52d06a89.js></script></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save