|
@@ -11,14 +11,14 @@
|
|
|
<text class="sys-color-green">真实照片</text>
|
|
|
<text class="sys-color-gray-9">,否则部分功能可能会受限</text>
|
|
|
</view>
|
|
|
- <view class="card-img" :class="{'open-img':imgBg}" @click="openPopup" :style="{'height':'calc(100vh - '+navHeight+'px - 278rpx - 270rpx - env(safe-area-inset-bottom)','background-image':'url('+getCosPath(imgBg)+')'}">
|
|
|
+ <view class="card-img" :class="{'open-img':imgBg}" @click="openPopup" :style="{'height':'calc(100vh - '+navHeight+'px - 278rpx - 270rpx - env(safe-area-inset-bottom)','background-image':'url('+imgBg+')'}">
|
|
|
<view class="add-box" v-if="!imgBg">
|
|
|
<image class="add-img" src="/static/img/common/add.png" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
<view class="card-agreement">
|
|
|
- <login-agreement :type="2"></login-agreement>
|
|
|
+ <login-agreement :type="2" v-model="isCheck"></login-agreement>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="login-bottom">
|
|
@@ -70,8 +70,8 @@ import EnNav from "@/components/en-utils/en-nav/en-nav";
|
|
|
import tools from "@/service/tools";
|
|
|
import LoginAgreement from "@/pages/login/model/loginAgreement";
|
|
|
import EnPopup from "@/components/en-utils/en-popup/en-popup";
|
|
|
-import {register} from "@/api/login";
|
|
|
import cosServe from "@/service/txOssSts";
|
|
|
+import {setCard} from "@/api/login";
|
|
|
export default {
|
|
|
components: {EnPopup, LoginAgreement, EnNav},
|
|
|
data() {
|
|
@@ -82,11 +82,14 @@ export default {
|
|
|
nickname:'',
|
|
|
password:'',
|
|
|
imgList:[],
|
|
|
- imgBg:''
|
|
|
+ imgBg:'',
|
|
|
+ isCheck:false
|
|
|
}
|
|
|
},
|
|
|
watch:{
|
|
|
-
|
|
|
+ 'isCheck':function (){
|
|
|
+ this.verifyIsOK()
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
openChooseImage(){
|
|
@@ -99,18 +102,16 @@ export default {
|
|
|
if(res.tempFiles.length>0){
|
|
|
console.log(res.tempFiles)
|
|
|
res.tempFiles.forEach((item,key)=>{
|
|
|
- cosServe.txUploadFile(item,'gallery').then((res)=>{
|
|
|
+ cosServe.txUploadFile(item,'gallery').then(async (res)=>{
|
|
|
if(key===0){
|
|
|
this.imgBg=res.Location
|
|
|
- console.log('this.imgBg:'+this.imgBg)
|
|
|
- this.imgBg=cosServe.getSignUrl(this.imgBg)
|
|
|
- console.log(this.imgBg)
|
|
|
+ this.imgBg=await cosServe.getSignUrl(this.imgBg)
|
|
|
}
|
|
|
this.imgList.push(res.Location)
|
|
|
})
|
|
|
})
|
|
|
console.log( this.imgList)
|
|
|
- this.isOK=true
|
|
|
+ this.verifyIsOK()
|
|
|
}
|
|
|
this.$refs.cardPopup.close()
|
|
|
}
|
|
@@ -121,10 +122,17 @@ export default {
|
|
|
},
|
|
|
setNextStep(){
|
|
|
if(this.isOK){
|
|
|
-
|
|
|
- uni.switchTab({
|
|
|
- 'url':'/pages/index/index'
|
|
|
+ let mobile=uni.getStorageSync('mobile')
|
|
|
+ setCard({'mobile':mobile,'cards':this.imgList}).then((res)=>{
|
|
|
+ if(res.code===0){
|
|
|
+ uni.switchTab({
|
|
|
+ 'url':'/pages/index/index'
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ tools.error(res.msg)
|
|
|
+ }
|
|
|
})
|
|
|
+
|
|
|
}else {
|
|
|
tools.error('请完善信息')
|
|
|
this.isShakeBut=true
|
|
@@ -134,7 +142,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
verifyIsOK(){
|
|
|
- this.isOK = this.nickname!=='' && this.password.length>=6;
|
|
|
+ this.isOK = this.isCheck && this.imgList.length>=0;
|
|
|
},
|
|
|
setNavHeight(navHeight){
|
|
|
this.navHeight=navHeight+41
|