调整二维码
This commit is contained in:
parent
fb636ec86c
commit
9e96a15357
|
@ -78,7 +78,7 @@ Page({
|
||||||
},
|
},
|
||||||
goCandidate: function (e) {
|
goCandidate: function (e) {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/candidate/show?number=' + this.data.candidate.number,
|
url: '/pages/candidate/show?id=' + this.data.candidate.id,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
downDoc: function (e) {
|
downDoc: function (e) {
|
||||||
|
|
|
@ -78,8 +78,7 @@ Page({
|
||||||
onlyFromCamera: true,
|
onlyFromCamera: true,
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
let number = res.result.split('/')[6]
|
let id = res.result.split('=')[1]
|
||||||
let id = number.substring(number.length-4).replace("0","")
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: 'detail?id=' + id,
|
url: 'detail?id=' + id,
|
||||||
})
|
})
|
||||||
|
|
|
@ -12,9 +12,9 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
let number = options.number;
|
let id = options.id;
|
||||||
this.setData({
|
this.setData({
|
||||||
url:getApp().globalData.host+'/crm/candidate/img/'+number+'/'
|
url:getApp().globalData.host+'/crm/candidate/img/?id='+id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,15 @@
|
||||||
"checkSiteMap": true,
|
"checkSiteMap": true,
|
||||||
"uploadWithSourceMap": true,
|
"uploadWithSourceMap": true,
|
||||||
"compileHotReLoad": false,
|
"compileHotReLoad": false,
|
||||||
"useMultiFrameRuntime": false,
|
"useMultiFrameRuntime": true,
|
||||||
"useApiHook": true,
|
"useApiHook": true,
|
||||||
|
"useApiHostProcess": false,
|
||||||
"babelSetting": {
|
"babelSetting": {
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"disablePlugins": [],
|
"disablePlugins": [],
|
||||||
"outputPath": ""
|
"outputPath": ""
|
||||||
},
|
},
|
||||||
"bundle": false,
|
"enableEngineNative": false,
|
||||||
"useIsolateContext": true,
|
"useIsolateContext": true,
|
||||||
"useCompilerModule": true,
|
"useCompilerModule": true,
|
||||||
"userConfirmedUseCompilerModuleSwitch": false,
|
"userConfirmedUseCompilerModuleSwitch": false,
|
||||||
|
|
|
@ -14,6 +14,6 @@ urlpatterns = [
|
||||||
path('consumer/mplogin/', ConsumerMPLoginView.as_view()),
|
path('consumer/mplogin/', ConsumerMPLoginView.as_view()),
|
||||||
path('consumer/register/', ConsumerRegister.as_view()),
|
path('consumer/register/', ConsumerRegister.as_view()),
|
||||||
path('change_remain_count/', change_remain_count.as_view()),
|
path('change_remain_count/', change_remain_count.as_view()),
|
||||||
path('candidate/img/<str:number>/',candidate),
|
path('candidate/img/',candidate),
|
||||||
path('', include(router.urls)),
|
path('', include(router.urls)),
|
||||||
]
|
]
|
||||||
|
|
|
@ -647,9 +647,15 @@ class change_remain_count(APIView):
|
||||||
return Response(status=status.HTTP_200_OK)
|
return Response(status=status.HTTP_200_OK)
|
||||||
|
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
def candidate(request, number):
|
from django.http import Http404
|
||||||
candidate = Candidate.objects.get(number=number)
|
def candidate(request):
|
||||||
return render(request, 'index.html', {"candidate":candidate})
|
if request.GET.get('id', None):
|
||||||
|
try:
|
||||||
|
candidate = Candidate.objects.get(id=request.GET.get('id'), number__isnull=False)
|
||||||
|
return render(request, 'index.html', {"candidate":candidate})
|
||||||
|
except:
|
||||||
|
raise Http404
|
||||||
|
raise Http404
|
||||||
|
|
||||||
from examtest.exports import exportw_test
|
from examtest.exports import exportw_test
|
||||||
class CandidateViewSet(RetrieveModelMixin, ListModelMixin, GenericViewSet):
|
class CandidateViewSet(RetrieveModelMixin, ListModelMixin, GenericViewSet):
|
||||||
|
|
Loading…
Reference in New Issue