bind wechat only one time
This commit is contained in:
parent
a8d3598288
commit
7aea984e34
|
@ -133,6 +133,11 @@ export default {
|
|||
if (valid) {
|
||||
this.submitLoding = true
|
||||
this.Form.questioncat = this.Form.questioncat.pop()
|
||||
for(let key in this.Form.options){
|
||||
if(!this.Form.options[key]){
|
||||
delete this.Form.options[key]
|
||||
}
|
||||
}
|
||||
createQuestion(this.Form).then(response => {
|
||||
this.submitLoding = false
|
||||
if(response.code >= 200){
|
||||
|
|
|
@ -137,6 +137,11 @@ export default {
|
|||
if(this.Form.questioncat instanceof Array){
|
||||
this.Form.questioncat = this.Form.questioncat.pop()
|
||||
}
|
||||
for(let key in this.Form.options){
|
||||
if(!this.Form.options[key]){
|
||||
delete this.Form.options[key]
|
||||
}
|
||||
}
|
||||
updateQuestion(this.Form.id, this.Form).then(response => {
|
||||
this.submitLoding = false
|
||||
if(response.code >= 200){
|
||||
|
|
|
@ -286,6 +286,8 @@ class ConsumerRegister(APIView):
|
|||
consumer_queryset = Consumer.objects.filter(username=phone)
|
||||
if consumer_queryset.exists(): # 是否存在
|
||||
consumer = consumer_queryset.first()
|
||||
if consumer.openid:
|
||||
return Response({'error':'该号码已使用!'})
|
||||
openid = request.user.openid
|
||||
request.user.delete(soft=False) # 彻底删除
|
||||
consumer.openid = openid
|
||||
|
|
Loading…
Reference in New Issue