daoru
This commit is contained in:
parent
9462471611
commit
3cab778234
|
@ -68,16 +68,7 @@ Page({
|
||||||
getDetail: function (id) {
|
getDetail: function (id) {
|
||||||
var that = this
|
var that = this
|
||||||
api.request(`/cms/article/${id}/`,'GET').then(res => {
|
api.request(`/cms/article/${id}/`,'GET').then(res => {
|
||||||
if(res.data.elink){
|
that.setData(res.data)
|
||||||
let elink_f = getApp().globalData.host + '/redirect?url='+res.data.elink
|
|
||||||
console.log(elink_f)
|
|
||||||
that.setData({
|
|
||||||
elink_f:elink_f
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
that.setData(res.data)
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
<web-view wx:if="{{elink_f}}" src="{{elink_f}}"></web-view>
|
<view class="page">
|
||||||
<view class="page" wx:else>
|
|
||||||
<view class="page__hd" style="padding:20px">
|
<view class="page__hd" style="padding:20px">
|
||||||
<view class="page__title" >{{title}}</view>
|
<view class="page__title" >{{title}}</view>
|
||||||
<view class="page__desc">
|
<view class="page__desc">
|
||||||
<span style="font-weight:bold;color:darkblue;font-size:16px">{{ifrom}} </span>
|
<span style="font-weight:bold;color:darkblue;font-size:16px">{{ifrom}} </span>
|
||||||
<text class="weui-badge" style="background:orange" wx:if="{{is_top}}">置顶</text>
|
<text class="weui-badge" style="background:orange" wx:if="{{is_top}}">置顶</text>
|
||||||
<text class="weui-badge" style="background:green">原创</text>
|
<text class="weui-badge" style="background:green" wx:if="{{!elink}}">原创</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="page__bd">
|
<view class="page__bd">
|
||||||
|
|
|
@ -202,7 +202,7 @@ class ConsumerViewSet(ModelViewSet):
|
||||||
companyname = sheet['C'+str(m)].value
|
companyname = sheet['C'+str(m)].value
|
||||||
if companyname:
|
if companyname:
|
||||||
companyname = companyname.replace(' ', '')
|
companyname = companyname.replace(' ', '')
|
||||||
companyobj = Company.objects.get_or_create(id=companydict[companyname])[0]
|
companyobj = Company.objects.get_or_create(name=companyname)[0]
|
||||||
workscope = sheet['d'+str(m)].value
|
workscope = sheet['d'+str(m)].value
|
||||||
if Consumer.objects.filter(username = username).exists():
|
if Consumer.objects.filter(username = username).exists():
|
||||||
obj = Consumer.objects.filter(username = username).first()
|
obj = Consumer.objects.filter(username = username).first()
|
||||||
|
|
Loading…
Reference in New Issue