Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
76aa12f2
Commit
76aa12f2
authored
Jun 04, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://git.banshouhui.com/lijundan/self-support
into dev
parents
188113e5
cf7ce8b4
Changes
23
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
975 additions
and
1916 deletions
+975
-1916
.env.js
.env.js
+1
-1
customer.vue
src/components/mine/customer.vue
+7
-12
bottomButtons.vue
src/components/order/bottomButtons.vue
+178
-0
detail.vue
src/components/order/detail.vue
+5
-1
index.vue
src/components/order/index.vue
+18
-4
performanceRecord.vue
src/components/order/performanceRecord.vue
+8
-6
qiniup.js
src/components/upload - 副本/qiniup.js
+0
-122
upload.js
src/components/upload - 副本/upload.js
+0
-173
pages.json
src/pages.json
+135
-139
index.vue
src/pages/index/index.vue
+3
-9
learn.vue
src/pages/index/learn.vue
+11
-9
mine.vue
src/pages/index/mine.vue
+6
-4
order.vue
src/pages/index/order.vue
+14
-16
course-detail.vue
src/pages/learn/course-detail.vue
+245
-237
news-details.vue
src/pages/learn/news-details.vue
+35
-9
section.vue
src/pages/learn/section.vue
+36
-10
index.vue
src/pages/login/index.vue
+14
-11
index.vue
src/pages/mine/wallet/index.vue
+4
-4
settlement.vue
src/pages/mine/wallet/settlement.vue
+6
-6
statement.vue
src/pages/mine/wallet/statement.vue
+7
-7
complete copy.vue
src/pages/order/complete copy.vue
+0
-1002
detail.vue
src/pages/order/detail.vue
+234
-124
util.js
src/utils/util.js
+8
-10
No files found.
.env.js
View file @
76aa12f2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
(
function
()
{
(
function
()
{
let
NODE_ENV
=
'test'
;
// dev:开发环境 | test:测试环境 | prod:生产环境
let
NODE_ENV
=
'test'
;
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
;
let
ENV_VAR
=
null
;
let
VERSION_NUMBER
=
'1.
2.9
'
;
//版本号
let
VERSION_NUMBER
=
'1.
3.1
'
;
//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
NODE_ENV
===
'dev'
)
{
if
(
NODE_ENV
===
'dev'
)
{
...
...
src/components/mine/customer.vue
View file @
76aa12f2
<
template
>
<
template
>
<view
class=
"cus-wrap-component"
>
<view
class=
"cus-wrap-component"
>
<image
class=
"top-image"
mode=
"widthFix"
v-if=
"!isPop"
:src=
"
minekefutuImage
"
></image>
<image
class=
"top-image"
mode=
"widthFix"
v-if=
"!isPop"
:src=
"
qnFile(imageName)
"
></image>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
:class=
"['title-view',
{'is-mine': isMine}]">
<view
:class=
"['title-view',
{'is-mine': isMine}]">
<text
:class=
"['title-text',
{'is-mine': isMine}]">
{{
titleText
[
typeIndex
]
}}
</text>
<text
:class=
"['title-text',
{'is-mine': isMine}]">
{{
titleText
[
typeIndex
]
}}
</text>
<text>
{{
tipText
[
typeIndex
]
}}
</text>
<text>
{{
tipText
[
typeIndex
]
}}
</text>
</view>
</view>
<u-image
:class=
"['qrcode',
{'is-mine': isMine}]" :src="cusQrcode" mode="widthFix" :fade="true"
<u-image
:class=
"['qrcode',
{'is-mine': isMine}]" :src="qnFile(cusQrcode)" mode="widthFix" :fade="false">
duration="450">
<u-loading
slot=
"loading"
></u-loading>
<u-loading
slot=
"loading"
></u-loading>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
</u-image>
</u-image>
<button
:class=
"['settle-button',
{'is-mine': isMine}]" type="primary" :open-type="openTypes[typeIndex]" show-message-card
<button
:class=
"['settle-button',
{'is-mine': isMine}]" type="primary" :open-type="openTypes[typeIndex]" show-message-card
send-message-title="点击下方客服会话添加订单助手" shape="circle" @click="download" :send-message-img="
kefuzxiaoxiImage
"
send-message-title="点击下方客服会话添加订单助手" shape="circle" @click="download" :send-message-img="
qnFile('kefuzxiaoxi.png')
"
send-message-path="/pages/index/index">
send-message-path="/pages/index/index">
{{
buttonText
[
typeIndex
]
}}
{{
buttonText
[
typeIndex
]
}}
</button>
</button>
...
@@ -45,14 +44,7 @@
...
@@ -45,14 +44,7 @@
},
},
computed
:
{
computed
:
{
cusQrcode
()
{
cusQrcode
()
{
let
src
=
this
.
isMine
?
'erweima-rk.png'
:
'dingdanzhushou-n.png'
;
return
this
.
isMine
?
'erweima-rk.png'
:
'dingdanzhushou-n.png'
;
return
util
.
imageCache
(
this
,
src
)
},
kefuzxiaoxiImage
()
{
return
util
.
imageCache
(
this
,
'kefuzxiaoxi.png'
)
},
minekefutuImage
()
{
return
util
.
imageCache
(
this
,
this
.
imageName
)
},
},
imageName
()
{
imageName
()
{
return
this
.
isMine
?
'kefufuwu-n.png'
:
'kefutuzs.png'
return
this
.
isMine
?
'kefufuwu-n.png'
:
'kefutuzs.png'
...
@@ -92,6 +84,9 @@
...
@@ -92,6 +84,9 @@
}
}
},
},
methods
:
{
methods
:
{
qnFile
(
src
)
{
return
process
.
uniEnv
.
qn_base_url
+
src
},
phoneToCustomer
()
{
// 联系客户
phoneToCustomer
()
{
// 联系客户
uni
.
makePhoneCall
({
uni
.
makePhoneCall
({
phoneNumber
:
this
.
phone
,
//仅为示例
phoneNumber
:
this
.
phone
,
//仅为示例
...
...
src/components/order/bottomButtons.vue
0 → 100644
View file @
76aa12f2
<
template
>
<view
class=
"bottom-button"
>
<view
v-for=
"(item, index) in list"
:class=
"['button-view', item.type]"
>
<u-button
:class=
"['list-button', item.type,
{'one': list.length == 1}]" @click="handleClick(item)"
:hover-class="item.type == 'image' || item.disabled ? 'none' : ''"
:custom-style="{...buttonStyle[item.disabled ? 'disabled' : item.type], ...item.customStyle}" type="primary" shape="circle">
<view
class=
"image-view"
v-if=
"item.type == 'image'"
>
<image
:src=
"baseImageUrl + item.image"
class=
"image-content"
></image>
</view>
<view
:class=
"['text-content', item.type]"
>
{{
item
.
label
}}
</view>
</u-button>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
// label: 按钮文字,
// type: 'text'普通按钮;'image'图文按钮
// image: type='image'的时候,按钮图片
// show: 是否显示,
// disabled: 是否禁用,true禁用;false 可以点击
// customStyle: 自定义button样式
buttons
:
{
type
:
Array
,
default
()
{
return
[{
label
:
'过程反馈'
,
type
:
'image'
,
image
:
'guochengfankui.png'
,
show
:
true
,
disabled
:
false
,
},
{
label
:
'异常签到'
,
type
:
'image'
,
image
:
'yichangqiandao.png'
,
show
:
false
,
disabled
:
false
},
{
label
:
'现场拍照'
,
type
:
'image'
,
image
:
'xiancahngpaizhao.png'
,
show
:
true
,
disabled
:
false
,
},
{
label
:
'接单'
,
type
:
'text'
,
show
:
true
,
disabled
:
true
,
customStyle
:
{
'background-color'
:
'#2272FF'
}
}
]
}
}
},
computed
:
{
baseImageUrl
()
{
return
process
.
uniEnv
.
qn_base_url
},
list
()
{
return
this
.
buttons
.
filter
((
item
)
=>
{
return
item
.
show
==
true
})
},
buttonStyle
()
{
return
{
'image'
:
{
'background-color'
:
'transparent'
,
'border-color'
:
'transparent'
,
'display'
:
'flex'
,
'flex-direction'
:
'column'
,
'height'
:
'104rpx'
,
'width'
:
'82rpx'
,
},
'text'
:
{
'background-color'
:
'#2272FF'
,
'border-color'
:
'transparent'
,
'display'
:
'flex'
,
'flex-direction'
:
'column'
,
'height'
:
'104rpx'
,
'width'
:
'100%'
,
},
'disabled'
:
{
'background-color'
:
'#D1D4D4'
,
'border-color'
:
'transparent'
,
'display'
:
'flex'
,
'flex-direction'
:
'column'
,
'height'
:
'104rpx'
,
'width'
:
'100%'
},
}
},
},
methods
:
{
// 0 主流程; 1 过程反馈;2 异常签到; 3 现场拍照
handleClick
(
item
)
{
if
(
item
.
disabled
)
return
this
.
$emit
(
'submit'
,
item
.
id
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.bottom-button
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding
:
0
30rpx
44rpx
30rpx
;
.button-view
{
max-width
:
600rpx
;
display
:
flex
;
&
.image
{}
&
.text
{
width
:
100%
;
display
:
flex
;
justify-content
:
flex-end
;
}
.list-button
{
display
:
flex
;
flex-direction
:
column
;
width
:
100%
;
&
.image
{
margin-right
:
40rpx
;
}
&
.text
{
width
:
400rpx
;
margin-left
:
40rpx
;
&
.one
{
width
:
600rpx
;
margin-left
:
0rpx
;
}
}
.image-view
{
flex-shrink
:
0
;
background-color
:
#FFFFFF
;
border-radius
:
38rpx
;
width
:
76rpx
;
height
:
76rpx
;
.image-content
{
width
:
76rpx
;
height
:
76rpx
;
}
}
.text-content
{
&
.text
{
color
:
#FFFFFF
;
font-size
:
32rpx
;
font-weight
:
bold
;
}
&
.image
{
color
:
#333333
;
font-size
:
20rpx
;
line-height
:
20rpx
;
height
:
20rpx
;
margin-top
:
8rpx
;
}
}
}
}
}
</
style
>
src/components/order/detail.vue
View file @
76aa12f2
...
@@ -15,6 +15,10 @@
...
@@ -15,6 +15,10 @@
<text>
合作厂商:
</text>
<text>
合作厂商:
</text>
<text>
{{
order
.
partnerCompanyName
}}
</text>
<text>
{{
order
.
partnerCompanyName
}}
</text>
</view>
</view>
<view
class=
"order-cell"
>
<text>
厂商编号:
</text>
<text>
{{
order
.
partnerSerialNumber
}}
</text>
</view>
<view
class=
"order-cell between-cell"
>
<view
class=
"order-cell between-cell"
>
<view
class=
"left"
>
<view
class=
"left"
>
<text>
客户信息:
</text>
<text>
客户信息:
</text>
...
@@ -164,7 +168,7 @@
...
@@ -164,7 +168,7 @@
padding-bottom
:
6rpx
;
padding-bottom
:
6rpx
;
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
padding
:
30rpx
30rpx
0
30rpx
;
//
padding: 30rpx 30rpx 0 30rpx;
border-radius
:
6px
;
border-radius
:
6px
;
.top-item
{
.top-item
{
...
...
src/components/order/index.vue
View file @
76aa12f2
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
<view
v-if=
"showCountTime"
class=
"bottom-left-view"
>
<view
v-if=
"showCountTime"
class=
"bottom-left-view"
>
<view
:class=
"['bottom-tag-view',
{'timeout': timeout}]">
<text>
{{
tagText
}}
</text></view>
<view
:class=
"['bottom-tag-view',
{'timeout': timeout}]">
<text>
{{
tagText
}}
</text></view>
<u-count-down
:timestamp=
"timestamp"
font-size=
"40"
show-days
separator=
"zh"
<u-count-down
:timestamp=
"timestamp"
font-size=
"40"
show-days
separator=
"zh"
:color=
"timeout ? '#FA5A49' : '#FF930D'"
@
change=
"handleChange"
separator-color=
"#666666"
ref=
"order-count-down"
></u-count-down>
:color=
"timeout ? '#FA5A49' : '#FF930D'"
@
change=
"handleChange"
separator-color=
"#666666"
ref=
"order-count-down"
></u-count-down>
</view>
</view>
<view
v-else-if=
"showTime"
>
<view
v-else-if=
"showTime"
>
<text>
{{
timeTitle
}}
</text>
<text>
{{
timeTitle
}}
</text>
...
@@ -196,6 +196,17 @@
...
@@ -196,6 +196,17 @@
showDistance
()
{
showDistance
()
{
return
this
.
orderType
==
0
&&
this
.
location
.
length
>=
2
&&
(
this
.
orderData
.
contactAddressLatitud
||
this
.
orderData
.
contactAddressLongitud
)
return
this
.
orderType
==
0
&&
this
.
location
.
length
>=
2
&&
(
this
.
orderData
.
contactAddressLatitud
||
this
.
orderData
.
contactAddressLongitud
)
},
},
titles
()
{
return
{
'waitAccept'
:
'待'
+
this
.
type0Text
,
// 待接单、
'waitAppointment'
:
'待预约'
,
// 待预约、
'waitCheckIn'
:
'待签到'
,
// 待签到、
'waitFinish'
:
'待完工'
,
// 待完工、
'audit'
:
'审核中'
,
// 审核中、
'exception'
:
'异常单'
,
// 异常单、
'finish'
:
'已完工'
,
//已完工
}
},
types
()
{
types
()
{
return
{
return
{
'waitAccept'
:
0
,
// 待接单、
'waitAccept'
:
0
,
// 待接单、
...
@@ -207,6 +218,9 @@
...
@@ -207,6 +218,9 @@
'finish'
:
6
,
//已完工
'finish'
:
6
,
//已完工
}
}
},
},
title
()
{
return
this
.
titles
[
this
.
type
]
},
orderDistance
()
{
orderDistance
()
{
return
this
.
distance
(
this
.
orderData
.
contactAddressLatitud
,
this
.
orderData
.
contactAddressLongitud
,
this
.
location
[
0
],
this
.
location
[
1
])
return
this
.
distance
(
this
.
orderData
.
contactAddressLatitud
,
this
.
orderData
.
contactAddressLongitud
,
this
.
location
[
0
],
this
.
location
[
1
])
},
},
...
@@ -243,7 +257,7 @@
...
@@ -243,7 +257,7 @@
return
3
return
3
}
else
if
(
this
.
orderData
.
orderStatus
==
85
||
this
.
orderData
.
orderStatus
==
87
)
{
}
else
if
(
this
.
orderData
.
orderStatus
==
85
||
this
.
orderData
.
orderStatus
==
87
)
{
return
4
return
4
}
else
if
(
this
.
orderData
.
orderStatus
==
86
||
this
.
orderData
.
orderStatus
==
88
)
{
}
else
if
(
this
.
orderData
.
orderStatus
==
86
||
this
.
orderData
.
orderStatus
==
88
)
{
return
5
return
5
}
else
if
([
80
,
81
,
89
,
110
].
indexOf
(
this
.
orderData
.
orderStatus
)
!=
-
1
)
{
}
else
if
([
80
,
81
,
89
,
110
].
indexOf
(
this
.
orderData
.
orderStatus
)
!=
-
1
)
{
return
6
return
6
...
@@ -267,10 +281,10 @@
...
@@ -267,10 +281,10 @@
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
// if (this.buttonDisabled) return
// if (this.buttonDisabled) return
this
.
$emit
(
'action'
)
this
.
$emit
(
'action'
,
this
.
orderData
,
this
.
title
)
},
},
handleClickCell
()
{
handleClickCell
()
{
this
.
$emit
(
'click'
)
this
.
$emit
(
'click'
,
this
.
orderData
,
this
.
title
)
},
},
handleChange
(
timestamp
)
{
handleChange
(
timestamp
)
{
if
(
this
.
timeout
)
this
.
$refs
[
'order-count-down'
].
seconds
+=
2
if
(
this
.
timeout
)
this
.
$refs
[
'order-count-down'
].
seconds
+=
2
...
...
src/components/order/performanceRecord.vue
View file @
76aa12f2
...
@@ -4,11 +4,11 @@
...
@@ -4,11 +4,11 @@
<text>
履约记录
</text>
<text>
履约记录
</text>
</view>
</view>
<view
v-if=
"orderRecords.length == 0"
class=
"no-record-view"
>
当前暂无履约记录
</view>
<view
v-if=
"orderRecords.length == 0"
class=
"no-record-view"
>
当前暂无履约记录
</view>
<view
v-else
class=
"record-list-view
"
>
<view
v-else
:class=
"['record-list-view',
{'short': orderRecords.length
<
=
showLenght
}]
"
>
<view
class=
"record-right-view"
>
<view
class=
"record-right-view"
>
<view
class=
"dashed-line-view"
></view>
<view
class=
"dashed-line-view"
></view>
<view
class=
"order-list"
>
<view
class=
"order-list"
>
<view
v-for=
"(record,index) in sh
wo
OrderRecords"
:key=
"record.operationContent"
:class=
"['order-cell',
{'first': index == 0}]">
<view
v-for=
"(record,index) in sh
ow
OrderRecords"
:key=
"record.operationContent"
:class=
"['order-cell',
{'first': index == 0}]">
<view
class=
"node-view"
>
<view
class=
"node-view"
>
<view
class=
"node-border-view"
>
<view
class=
"node-border-view"
>
<view
class=
"node-middle-view"
></view>
<view
class=
"node-middle-view"
></view>
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
}
}
},
},
computed
:
{
computed
:
{
sh
wo
OrderRecords
()
{
sh
ow
OrderRecords
()
{
if
(
this
.
readMoreRecord
&&
this
.
orderRecords
&&
this
.
orderRecords
.
length
>
0
)
{
if
(
this
.
readMoreRecord
&&
this
.
orderRecords
&&
this
.
orderRecords
.
length
>
0
)
{
return
this
.
orderRecords
.
slice
(
0
,
this
.
showLenght
)
return
this
.
orderRecords
.
slice
(
0
,
this
.
showLenght
)
}
else
{
}
else
{
...
@@ -100,7 +100,9 @@
...
@@ -100,7 +100,9 @@
.record-list-view
{
.record-list-view
{
position
:
relative
;
position
:
relative
;
&
.short
{
padding-bottom
:
30rpx
;
}
.record-right-view
{
.record-right-view
{
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
...
@@ -189,7 +191,7 @@
...
@@ -189,7 +191,7 @@
text-align
:
center
;
text-align
:
center
;
color
:
#2272FF
;
color
:
#2272FF
;
font-size
:
26rpx
;
font-size
:
26rpx
;
margin
-top
:
30rpx
;
padding
-top
:
30rpx
;
padding-bottom
:
30rpx
;
padding-bottom
:
30rpx
;
}
}
...
...
src/components/upload - 副本/qiniup.js
deleted
100644 → 0
View file @
188113e5
import
qiniuUploader
from
'@/include/libs/qiniuUploader.js'
;
const
globalUrl
=
process
.
uniEnv
||
{}
export
default
{
name
:
'qiniup'
,
components
:
{},
data
()
{
return
{
domain
:
'http://upload.qiniup.com'
,
// 七牛上传域名地址
uptokenURL
:
globalUrl
.
ucenterUrl
.
apiUrl
+
'/v1/tokens'
,
// 上传token地址
files
:[],
// 上传文件
fileMaps
:[],
// 上传文件返回对象
keys
:[],
// 七牛返回key
uploadToken
:
''
,
// 上传token
maximum
:
999
,
// 最大上传数量
qiniuOptions
:
{},
// 七牛上传配置
};
},
created
()
{
this
.
initQiniu
()
},
methods
:
{
initQiniu
:
function
()
{
var
defaulfs
=
{
// bucket所在区域,这里是华北区。ECN, SCN, NCN, NA, ASG,分别对应七牛云的:华东,华南,华北,北美,新加坡 5 个区域
region
:
'ECN'
,
bucket
:
'fa-cms'
,
qiniuBucketURLPrefix
:
'uploads'
,
// 获取uptoken方法三选一即可,执行优先级为:uptoken > uptokenURL > uptokenFunc。三选一,剩下两个置空。推荐使用uptokenURL,详情请见 README.md
// 由其他程序生成七牛云uptoken,然后直接写入uptoken
uptoken
:
''
,
// 从指定 url 通过 HTTP GET 获取 uptoken,返回的格式必须是 json 且包含 uptoken 字段,例如: {"uptoken": "0MLvWPnyy..."}
uptokenURL
:
this
.
uptokenURL
,
// uptokenFunc 这个属性的值可以是一个用来生成uptoken的函数,详情请见 README.md
uptokenFunc
:
function
()
{
},
// bucket 外链域名,下载资源时用到。如果设置,会在 success callback 的 res 参数加上可以直接使用的 fileURL 字段。否则需要自己拼接
domain
:
this
.
domain
,
// qiniuShouldUseQiniuFileName 如果是 true,则文件的 key 由 qiniu 服务器分配(全局去重)。如果是 false,则文件的 key 使用微信自动生成的 filename。出于初代sdk用户升级后兼容问题的考虑,默认是 false。
// 微信自动生成的 filename较长,导致fileURL较长。推荐使用{qiniuShouldUseQiniuFileName: true} + "通过fileURL下载文件时,自定义下载名" 的组合方式。
// 自定义上传key 需要两个条件:1. 此处shouldUseQiniuFileName值为false。 2. 通过修改qiniuUploader.upload方法传入的options参数,可以进行自定义key。(请不要直接在sdk中修改options参数,修改方法请见demo的index.js)
// 通过fileURL下载文件时,自定义下载名,请参考:七牛云“对象存储 > 产品手册 > 下载资源 > 下载设置 > 自定义资源下载名”(https://developer.qiniu.com/kodo/manual/1659/download-setting)。本sdk在README.md的"常见问题"板块中,有"通过fileURL下载文件时,自定义下载名"使用样例。
shouldUseQiniuFileName
:
true
};
let
options
=
{}
if
(
Object
.
keys
(
this
.
qiniuOptions
).
length
)
{
Object
.
assign
(
options
,
defaulfs
,
this
.
qiniuOptions
);
}
else
{
options
=
defaulfs
;
}
// 将七牛云相关配置初始化进本sdk
qiniuUploader
.
init
(
options
);
},
getUrlKey
(
file
)
{
let
index
=
file
.
lastIndexOf
(
'/'
);
let
len
=
file
.
length
let
name
=
file
.
substring
(
index
+
1
,
len
)
return
name
;
},
/**
* 确认上传
* @param {boolean} submit
*/
confirmUpload
(
submit
=
false
)
{
let
self
=
this
const
fileList
=
self
.
files
if
(
self
.
maximum
-
fileList
.
length
<=
0
)
{
uni
.
showToast
({
title
:
'图片数量不能大于'
+
self
.
maximum
,
icon
:
'none'
})
return
}
for
(
let
file
of
fileList
)
{
let
name
=
self
.
getUrlKey
(
file
)
// 交给七牛上传
let
item
=
{
src
:
''
,
id
:
''
,
key
:
''
,
// filesize: '',
progress
:
0
}
const
params
=
{
name
:
name
,
file
:
file
,
}
qiniuUploader
.
upload
(
params
,
(
res
)
=>
{
let
inLen
=
self
.
maximum
-
fileList
.
length
if
(
inLen
>
0
)
{
item
.
src
=
file
item
.
key
=
res
.
key
||
res
.
src
self
.
fileMaps
.
push
(
item
);
self
.
keys
.
push
(
item
.
key
)
if
(
submit
)
{
self
.
submitFile
()
}
}
else
{
uni
.
showToast
({
title
:
'图片数量不能大于9'
})
}
},
(
error
)
=>
{
console
.
log
(
'error: '
+
error
);
},
null
,
(
res
)
=>
{
item
.
progress
=
res
.
progress
},
()
=>
{
// 取消上传
},
()
=>
{
// `before` 上传前执行的操作
},
(
err
)
=>
{
// `complete` 上传接受后执行的操作(无论成功还是失败都执行)
});
}
}
}
}
src/components/upload - 副本/upload.js
deleted
100644 → 0
View file @
188113e5
import
qiniuUploader
from
'@/include/libs/qiniuUploader.js'
;
const
globalUrl
=
process
.
uniEnv
||
{}
export
default
{
name
:
'upload-img'
,
components
:
{},
data
()
{
return
{
domain
:
'http://upload.qiniup.com'
,
uptokenURL
:
globalUrl
.
ucenterUrl
.
apiUrl
+
'/v1/tokens'
,
imgList
:
[],
imgs
:[],
uploadToken
:
''
,
selectNum
:
999
,
};
},
computed
:
{
uploadBtnShow
()
{
let
flag
=
this
.
imgList
.
length
<
this
.
selectNum
return
flag
&&
this
.
uploadVisible
}
},
created
()
{
this
.
initQiniu
()
this
.
initImg
();
},
methods
:
{
initQiniu
:
function
()
{
var
options
=
{
// bucket所在区域,这里是华北区。ECN, SCN, NCN, NA, ASG,分别对应七牛云的:华东,华南,华北,北美,新加坡 5 个区域
region
:
'ECN'
,
bucket
:
'fa-cms'
,
qiniuBucketURLPrefix
:
'uploads'
,
// 获取uptoken方法三选一即可,执行优先级为:uptoken > uptokenURL > uptokenFunc。三选一,剩下两个置空。推荐使用uptokenURL,详情请见 README.md
// 由其他程序生成七牛云uptoken,然后直接写入uptoken
uptoken
:
''
,
// 从指定 url 通过 HTTP GET 获取 uptoken,返回的格式必须是 json 且包含 uptoken 字段,例如: {"uptoken": "0MLvWPnyy..."}
uptokenURL
:
this
.
uptokenURL
,
// uptokenFunc 这个属性的值可以是一个用来生成uptoken的函数,详情请见 README.md
uptokenFunc
:
function
()
{
},
// bucket 外链域名,下载资源时用到。如果设置,会在 success callback 的 res 参数加上可以直接使用的 fileURL 字段。否则需要自己拼接
domain
:
this
.
domain
,
// qiniuShouldUseQiniuFileName 如果是 true,则文件的 key 由 qiniu 服务器分配(全局去重)。如果是 false,则文件的 key 使用微信自动生成的 filename。出于初代sdk用户升级后兼容问题的考虑,默认是 false。
// 微信自动生成的 filename较长,导致fileURL较长。推荐使用{qiniuShouldUseQiniuFileName: true} + "通过fileURL下载文件时,自定义下载名" 的组合方式。
// 自定义上传key 需要两个条件:1. 此处shouldUseQiniuFileName值为false。 2. 通过修改qiniuUploader.upload方法传入的options参数,可以进行自定义key。(请不要直接在sdk中修改options参数,修改方法请见demo的index.js)
// 通过fileURL下载文件时,自定义下载名,请参考:七牛云“对象存储 > 产品手册 > 下载资源 > 下载设置 > 自定义资源下载名”(https://developer.qiniu.com/kodo/manual/1659/download-setting)。本sdk在README.md的"常见问题"板块中,有"通过fileURL下载文件时,自定义下载名"使用样例。
shouldUseQiniuFileName
:
true
};
// 将七牛云相关配置初始化进本sdk
qiniuUploader
.
init
(
options
);
},
chooseImage
()
{
if
(
this
.
selectNum
-
this
.
imgList
.
length
<=
0
)
{
uni
.
showToast
({
title
:
'图片数量不能大于'
+
this
.
selectNum
,
icon
:
'none'
})
return
}
uni
.
chooseImage
({
count
:
this
.
selectNum
,
//默认9 this.selectNum
success
:
(
chooseImageRes
)
=>
{
for
(
var
i
=
0
;
i
<
chooseImageRes
.
tempFilePaths
.
length
;
i
++
)
{
let
file
=
chooseImageRes
.
tempFilePaths
[
i
];
let
index
=
file
.
lastIndexOf
(
'/'
);
let
len
=
file
.
length
let
name
=
file
.
substring
(
index
+
1
,
len
)
// 交给七牛上传
let
newLen
=
this
.
selectNum
-
this
.
imgList
.
length
let
item
=
{
src
:
''
,
id
:
''
,
key
:
''
,
// filesize: '',
progress
:
0
}
const
params
=
{
name
:
name
,
file
:
file
,
}
if
(
newLen
>
0
)
{
qiniuUploader
.
upload
(
params
,
(
res
)
=>
{
let
inLen
=
this
.
selectNum
-
this
.
imgList
.
length
if
(
inLen
>
0
)
{
item
.
src
=
file
item
.
key
=
res
.
key
||
res
.
src
this
.
imgList
.
push
(
item
);
this
.
imgs
.
push
(
res
.
key
)
// this.addRecord(item,res)
}
else
{
uni
.
showToast
({
title
:
'图片数量不能大于9'
})
}
},
(
error
)
=>
{
console
.
log
(
'error: '
+
error
);
},
null
,
(
res
)
=>
{
// item.filesize = res.totalBytesSent
item
.
progress
=
res
.
progress
},
()
=>
{
// 取消上传
},
()
=>
{
// `before` 上传前执行的操作
},
(
err
)
=>
{
// `complete` 上传接受后执行的操作(无论成功还是失败都执行)
});
}
}
}
})
},
perviewImg
(
index
)
{
let
urls
=
[]
this
.
imgList
.
map
(
item
=>
{
urls
.
push
(
item
.
src
)
})
uni
.
previewImage
({
current
:
index
,
urls
:
urls
});
},
initImg
()
{
//传入图片,回显
this
.
imgList
=
this
.
initImgList
.
map
(
item
=>
{
let
imgItem
=
{
src
:
''
,
id
:
''
}
if
(
typeof
item
===
'string'
){
imgItem
.
src
=
item
}
else
{
imgItem
.
src
=
item
.
src
||
item
.
pic
||
item
.
image
imgItem
.
id
=
item
.
id
||
'0'
}
return
imgItem
})
},
// async addRecord(item, res) {
// let path = res.key;
// let hash = res.hash;
// let ext = path.substr(path.lastIndexOf('.') + 1);
// //推送到增加记录接口
// let params = {
// filename: hash + '.' + ext,
// full_url: res.fileURL,
// absolute_path: path,
// filesize: item.filesize,
// ext: ext
// };
// let recordRes = await this.$u.api.qiniuRecord(params);
// if (recordRes.code != 1) {
// uni.showToast({
// title: recordRs.msg,
// icon: 'none'
// })
// return
// }
// item.id = recordRes.data.id.id
// },
async
removeImg
(
index
)
{
this
.
imgList
.
splice
(
index
,
1
)
// this.$emit('image-change', this.imgList) //将图片回传父页面
},
getUrlKey
(
file
)
{
let
index
=
file
.
lastIndexOf
(
'/'
);
let
len
=
file
.
length
let
name
=
file
.
substring
(
index
+
1
,
len
)
return
name
;
}
}
}
src/pages.json
View file @
76aa12f2
This diff is collapsed.
Click to expand it.
src/pages/index/index.vue
View file @
76aa12f2
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
scroll-anchoring
>
-->
scroll-anchoring
>
-->
<view
v-for=
"(item, index) in orderList"
:key=
"index"
>
<view
v-for=
"(item, index) in orderList"
:key=
"index"
>
<OrderCell
:orderData=
"item"
type=
"waitAccept"
:location=
"location"
<OrderCell
:orderData=
"item"
type=
"waitAccept"
:location=
"location"
@
click=
"handleClick
(item.orderId)"
@
action=
"handleAction(item.orderId)
"
>
@
click=
"handleClick
"
@
action=
"handleClick
"
>
</OrderCell>
</OrderCell>
</view>
</view>
<u-loadmore
v-show=
"(search.pageNumber == 1 && loadedOrder) || search.pageNumber > 2"
:status=
"currentLoadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
<u-loadmore
v-show=
"(search.pageNumber == 1 && loadedOrder) || search.pageNumber > 2"
:status=
"currentLoadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
...
@@ -166,15 +166,9 @@
...
@@ -166,15 +166,9 @@
this
.
getOrderCount
()
this
.
getOrderCount
()
this
.
initSettleInfo
();
this
.
initSettleInfo
();
},
},
handleClick
(
orderId
)
{
// 点击了cell
handleClick
(
item
,
title
)
{
// 跳转工单详情页面
this
.
viewOderItem
(
orderId
)
},
handleAction
(
orderId
)
{
// 点击了按钮
this
.
viewOderItem
(
orderId
)
},
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
orderId
url
:
'pages/order/detail?id='
+
item
.
orderId
+
'&title='
+
title
})
})
},
},
async
initSettleInfo
()
{
async
initSettleInfo
()
{
...
...
src/pages/index/learn.vue
View file @
76aa12f2
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
</view>
</view>
</scroll-view>
</scroll-view>
</swiper-item>
</swiper-item>
<swiper-item
@
touchmove
.
stop
.
prevent=
"stopTouchMove"
>
<swiper-item
@
touchmove
.
stop
.
prevent=
"stopTouchMove"
v-if=
"version"
>
<scroll-view
scroll-y
style=
"height:100%;width:100%;"
>
<scroll-view
scroll-y
style=
"height:100%;width:100%;"
>
<view
class=
"title u-margin-top-10 u-margin-bottom-30"
>
通用课程
</view>
<view
class=
"title u-margin-top-10 u-margin-bottom-30"
>
通用课程
</view>
<view
class=
"learn-currency-class"
>
<view
class=
"learn-currency-class"
>
...
@@ -231,12 +231,12 @@ var json = {
...
@@ -231,12 +231,12 @@ var json = {
sectionId
:
""
,
sectionId
:
""
,
},
},
{
{
title
:
"
充电桩安装要点提示
"
,
title
:
"
学习-我的模块
"
,
desc
:
"
在充电装安装过程中需要着重注意的要点
"
,
desc
:
"
学习-我的模块
"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"cdz-3x-v2.png"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"cdz-3x-v2.png"
,
percent
:
0
,
percent
:
0
,
status
:
""
,
status
:
""
,
id
:
15
1
,
id
:
15
2
,
sectionId
:
""
,
sectionId
:
""
,
},
},
],
],
...
@@ -374,6 +374,9 @@ export default {
...
@@ -374,6 +374,9 @@ export default {
{
{
name
:
"消息通知"
,
name
:
"消息通知"
,
},
},
{
name
:
"在线学习"
,
},
{
{
name
:
"考核认证"
,
name
:
"考核认证"
,
},
},
...
@@ -385,9 +388,6 @@ export default {
...
@@ -385,9 +388,6 @@ export default {
{
{
name
:
"消息通知"
,
name
:
"消息通知"
,
},
},
{
name
:
"在线学习"
,
},
{
{
name
:
"考核认证"
,
name
:
"考核认证"
,
},
},
...
@@ -474,7 +474,7 @@ export default {
...
@@ -474,7 +474,7 @@ export default {
isReflesh
:
true
,
isReflesh
:
true
,
triggered
:
false
,
triggered
:
false
,
_freshing
:
false
,
_freshing
:
false
,
version
:
fals
e
,
version
:
tru
e
,
};
};
},
},
onLoad
(
param
)
{
onLoad
(
param
)
{
...
@@ -512,8 +512,9 @@ export default {
...
@@ -512,8 +512,9 @@ export default {
.
getVersionInfo
(
version
)
.
getVersionInfo
(
version
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
let
data
=
res
.
data
;
let
data
=
res
.
data
;
if
(
data
.
hasOwnProperty
(
'is_audit'
)
&&
data
.
is_audit
==
1
){
if
(
data
.
hasOwnProperty
(
'is_audit'
)
&&
data
.
is_audit
==
0
){
that
.
tabs
=
that
.
tabs2
;
that
.
tabs
=
that
.
tabs2
;
that
.
version
=
false
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
...
@@ -800,6 +801,7 @@ export default {
...
@@ -800,6 +801,7 @@ export default {
var
news
=
{
var
news
=
{
body
:
e
.
body
,
body
:
e
.
body
,
title
:
e
.
title
,
title
:
e
.
title
,
create_at
:
e
.
create_at
,
};
};
let
that
=
this
;
let
that
=
this
;
wx
.
navigateTo
({
wx
.
navigateTo
({
...
...
src/pages/index/mine.vue
View file @
76aa12f2
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<u-cell-group
:border=
"false"
>
<u-cell-group
:border=
"false"
>
<view
v-for=
"(item, index) in items"
:key=
"index"
>
<view
v-for=
"(item, index) in items"
:key=
"index"
>
<u-cell-item
:value=
"item.value"
:border-bottom=
"false"
@
click=
"handleClick(item.pathName)"
>
<u-cell-item
:value=
"item.value"
:border-bottom=
"false"
@
click=
"handleClick(item.pathName)"
>
<image
slot=
"icon"
:src=
"qn
Path + item.icon
"
:style=
"item.imageStyle"
></image>
<image
slot=
"icon"
:src=
"qn
File(item.icon)
"
:style=
"item.imageStyle"
></image>
<view
slot=
"title"
class=
"item-title"
>
{{
item
.
title
}}
</view>
<view
slot=
"title"
class=
"item-title"
>
{{
item
.
title
}}
</view>
<view
slot=
"value"
class=
"item-value"
>
{{
value
}}
</view>
<view
slot=
"value"
class=
"item-value"
>
{{
value
}}
</view>
</u-cell-item>
</u-cell-item>
...
@@ -43,7 +43,6 @@
...
@@ -43,7 +43,6 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
qnPath
:
process
.
uniEnv
.
qn_base_url
,
serviceTel
:
'18124099271'
,
serviceTel
:
'18124099271'
,
showSuperButton
:
false
,
showSuperButton
:
false
,
show
:
false
,
show
:
false
,
...
@@ -142,10 +141,13 @@
...
@@ -142,10 +141,13 @@
this
.
getData
()
this
.
getData
()
}
}
}
}
this
.
wodebeijingImage
=
await
util
.
imageCache
(
this
,
'wodebeijing.png'
)
this
.
wodebeijingImage
=
this
.
qnFile
(
'wodebeijing.png'
)
this
.
placeholderImage
=
await
util
.
imageCache
(
this
,
'touxiang.png'
)
this
.
placeholderImage
=
this
.
qnFile
(
'touxiang.png'
)
},
},
methods
:
{
methods
:
{
qnFile
(
src
)
{
return
process
.
uniEnv
.
qn_base_url
+
src
},
getData
()
{
getData
()
{
let
self
=
this
let
self
=
this
app
.
getBaseInfo
(
self
);
app
.
getBaseInfo
(
self
);
...
...
src/pages/index/order.vue
View file @
76aa12f2
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
<NoOrder
v-if=
"noMore"
type=
"black"
:customStyle=
"noOrderCustomStyle"
/>
<NoOrder
v-if=
"noMore"
type=
"black"
:customStyle=
"noOrderCustomStyle"
/>
<template
v-else
>
<template
v-else
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:type=
"orderType"
:location=
"dataValue"
@
click=
"handleClick
(item)
"
<OrderCell
:orderData=
"item"
:type=
"orderType"
:location=
"dataValue"
@
click=
"handleClick"
@
action=
"handle
Action(item)
"
>
</OrderCell>
@
action=
"handle
Click
"
>
</OrderCell>
</view>
</view>
<u-loadmore
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 2"
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
<u-loadmore
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 2"
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</
template
>
</
template
>
...
@@ -282,17 +282,15 @@
...
@@ -282,17 +282,15 @@
}
}
});
});
},
},
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
handleClick
(
item
,
title
)
{
uni
.
navigateTo
({
console
.
log
(
item
,
title
)
url
:
'pages/order/detail?id='
+
orderId
})
},
handleClick
(
item
)
{
if
(
item
.
orderStatus
===
86
||
item
.
orderStatus
===
88
){
if
(
item
.
orderStatus
===
86
||
item
.
orderStatus
===
88
){
this
.
filish
(
item
)
this
.
filish
(
item
)
return
return
}
}
this
.
viewOderItem
(
item
.
orderId
)
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
item
.
orderId
+
'&title='
+
title
})
},
},
filish
(
item
){
filish
(
item
){
// 去完工
// 去完工
...
@@ -305,13 +303,13 @@
...
@@ -305,13 +303,13 @@
+
"&auditResultsId="
+
(
item
.
auditResults
?
Object
.
keys
(
item
.
auditResults
)[
Object
.
keys
(
item
.
auditResults
).
length
-
1
]:
''
)
+
"&auditResultsId="
+
(
item
.
auditResults
?
Object
.
keys
(
item
.
auditResults
)[
Object
.
keys
(
item
.
auditResults
).
length
-
1
]:
''
)
})
})
},
},
handleAction
(
item
)
{
//
handleAction(item) {
if
(
item
.
orderStatus
===
86
||
item
.
orderStatus
===
88
){
//
if(item.orderStatus===86 || item.orderStatus===88){
this
.
filish
(
item
)
//
this.filish(item)
return
//
return
}
//
}
this
.
viewOderItem
(
item
.
orderId
)
//
this.viewOderItem(item.orderId)
},
//
},
handleClickSearch
()
{
handleClickSearch
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'pages/order/search'
url
:
'pages/order/search'
...
...
src/pages/learn/course-detail.vue
View file @
76aa12f2
<
template
>
<
template
>
<view
class=
"learn-vedio"
>
<view
class=
"learn-vedio"
>
<view
v-if=
"version && loaded"
>
<u-navbar
title=
"培训视频"
></u-navbar>
<u-navbar
title=
"培训视频"
></u-navbar>
<view
class=
"uni-padding-wrap uni-common-mt"
>
<view
class=
"uni-padding-wrap uni-common-mt"
>
<view
<view><video
object-fit=
"fill"
class=
"course-video"
id=
"courseVideo"
:src=
"courseSrc"
@
play=
"playCourse"
><video
@
error=
"videoErrorCallback"
controls
></video></view>
object-fit=
"fill"
class=
"course-video"
id=
"courseVideo"
:src=
"courseSrc"
@
play=
"playCourse"
@
error=
"videoErrorCallback"
controls
></video
></view>
<view
class=
"title-content"
>
<view
class=
"title-content"
>
<view
class=
"item-content"
>
<view
class=
"item-content"
>
<view
class=
"item-st"
>
<view
class=
"item-st"
>
<image
style=
"width: 80rpx; height: 36rpx"
:src=
"kcImage"
></image>
<image
style=
"width: 80rpx; height: 36rpx"
:src=
"kcImage"
></image>
<text
class=
"item-st-text"
>
{{
<text
class=
"item-st-text"
>
{{
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
0
]
:
""
}}
</text>
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
0
]
:
""
}}
</text>
</view>
</view>
<view
class=
"item-title"
>
{{
<view
class=
"item-title"
>
{{
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
1
]
:
""
}}
</view>
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
1
]
:
""
}}
</view>
</view>
</view>
<view
<view>
接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。
</view>
>
接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。
</view
>
</view>
</view>
<view
class=
"learn-view"
v-if=
"courseId >= 0"
>
<view
class=
"learn-view"
v-if=
"courseId >= 0"
>
<view
class=
"learn-view-title"
>
视频内容介绍
</view>
<view
class=
"learn-view-title"
>
视频内容介绍
</view>
<view
<view
class=
"learn-list"
v-for=
"(item, key) in courseOutlines[courseId]"
:key=
"key"
>
class=
"learn-list"
v-for=
"(item, key) in courseOutlines[courseId]"
:key=
"key"
>
<view
class=
"learn-list-item"
>
{{
item
}}
</view>
<view
class=
"learn-list-item"
>
{{
item
}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
v-else-if=
"loaded"
>
<u-navbar
title=
" "
></u-navbar>
<view
style=
"text-align: center;"
>
暂无数据
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
let
app
=
getApp
();
let
app
=
getApp
();
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
courseId
:
""
,
courseId
:
""
,
...
@@ -54,6 +41,8 @@ export default {
...
@@ -54,6 +41,8 @@ export default {
courseTitle
:
""
,
courseTitle
:
""
,
courseDesc
:
""
,
courseDesc
:
""
,
currentIndex
:
-
1
,
// 第几个视频
currentIndex
:
-
1
,
// 第几个视频
version
:
true
,
loaded
:
false
};
};
},
},
computed
:
{
computed
:
{
...
@@ -103,21 +92,38 @@ export default {
...
@@ -103,21 +92,38 @@ export default {
this
.
courseStatus
=
e
.
status
;
this
.
courseStatus
=
e
.
status
;
}
}
}
}
this
.
getVersion
();
},
},
onReady
:
function
(
res
)
{
onReady
:
function
(
res
)
{
// #ifndef MP-ALIPAY
// #ifndef MP-ALIPAY
this
.
videoContext
=
uni
.
createVideoContext
(
"courseVideo"
);
this
.
videoContext
=
uni
.
createVideoContext
(
"courseVideo"
);
// #endif
// #endif
},
},
methods
:
{
methods
:
{
videoErrorCallback
:
function
(
e
)
{
getVersion
()
{
let
version
=
process
.
uniEnv
.
version_number
;
let
that
=
this
;
this
.
$u
.
api
.
getVersionInfo
(
version
)
.
then
((
res
)
=>
{
that
.
loaded
=
true
let
data
=
res
.
data
;
if
(
data
.
hasOwnProperty
(
'is_audit'
)
&&
data
.
is_audit
==
0
)
{
that
.
version
=
false
}
})
.
catch
((
err
)
=>
{
});
},
videoErrorCallback
:
function
(
e
)
{
uni
.
showModal
({
uni
.
showModal
({
content
:
e
.
target
.
errMsg
,
content
:
e
.
target
.
errMsg
,
showCancel
:
false
,
showCancel
:
false
,
});
});
},
},
playCourse
:
function
(
e
)
{
playCourse
:
function
(
e
)
{
if
(
this
.
courseStatus
&&
(
this
.
courseStatus
==
"1"
||
this
.
courseStatus
==
1
))
{
if
(
this
.
courseStatus
&&
(
this
.
courseStatus
==
"1"
||
this
.
courseStatus
==
1
))
{
return
return
}
}
this
.
changeCourseStatus
();
this
.
changeCourseStatus
();
...
@@ -144,11 +150,11 @@ export default {
...
@@ -144,11 +150,11 @@ export default {
}
}
},
},
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.learn-vedio
{
.learn-vedio
{
background-color
:
#f4f5f7
;
background-color
:
#f4f5f7
;
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
...
@@ -157,24 +163,24 @@ export default {
...
@@ -157,24 +163,24 @@ export default {
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
.course-video
{
.course-video
{
width
:
750rpx
;
width
:
750rpx
;
}
}
.course-title
{
.course-title
{
font-size
:
36rpx
;
font-size
:
36rpx
;
font-weight
:
700
;
font-weight
:
700
;
padding
:
80rpx
60rpx
40rpx
60rpx
;
padding
:
80rpx
60rpx
40rpx
60rpx
;
}
}
.course-desc
{
.course-desc
{
margin-left
:
60rpx
;
margin-left
:
60rpx
;
}
}
.title-content
{
.title-content
{
padding
:
40rpx
30rpx
;
padding
:
40rpx
30rpx
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
...
@@ -194,6 +200,7 @@ export default {
...
@@ -194,6 +200,7 @@ export default {
margin-right
:
20rpx
;
margin-right
:
20rpx
;
line-height
:
24rpx
;
line-height
:
24rpx
;
position
:
relative
;
position
:
relative
;
.item-st-text
{
.item-st-text
{
color
:
#ffffff
;
color
:
#ffffff
;
position
:
absolute
;
position
:
absolute
;
...
@@ -209,19 +216,19 @@ export default {
...
@@ -209,19 +216,19 @@ export default {
font-size
:
44rpx
;
font-size
:
44rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
}
}
.item-content
{
.item-content
{
display
:
flex
;
display
:
flex
;
padding-bottom
:
30rpx
;
padding-bottom
:
30rpx
;
}
}
.item-title
{
.item-title
{
color
:
#333333
;
color
:
#333333
;
font-size
:
28rpx
;
font-size
:
28rpx
;
}
}
.learn-view
{
.learn-view
{
background-color
:
#ffffff
;
background-color
:
#ffffff
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding
:
38rpx
30rpx
30rpx
30rpx
;
padding
:
38rpx
30rpx
30rpx
30rpx
;
...
@@ -234,6 +241,7 @@ export default {
...
@@ -234,6 +241,7 @@ export default {
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
10rpx
;
margin-bottom
:
10rpx
;
}
}
.learn-list
{
.learn-list
{
.learn-list-item
{
.learn-list-item
{
font-size
:
28rpx
;
font-size
:
28rpx
;
...
@@ -248,5 +256,5 @@ export default {
...
@@ -248,5 +256,5 @@ export default {
width
:
100%
;
width
:
100%
;
}
}
}
}
}
}
</
style
>
</
style
>
src/pages/learn/news-details.vue
View file @
76aa12f2
<
template
>
<
template
>
<view>
<view
class=
"news-wrap"
>
<u-navbar
<u-navbar
back-icon-color=
"#000000"
back-icon-color=
"#000000"
:background=
"background"
:background=
"background"
...
@@ -9,8 +9,11 @@
...
@@ -9,8 +9,11 @@
<view
class=
"title"
>
<view
class=
"title"
>
{{
title
}}
{{
title
}}
</view>
</view>
<view
class=
"time-txt"
>
{{
time
|
datefmt
(
'YYYY.MM.DD HH:mm:ss'
)
}}
</view>
<view
class=
"u-content"
>
<view
class=
"u-content"
>
<u-parse
:html=
"body"
:tag-style=
"style"
></u-parse>
<u-parse
:html=
"body"
:tag-style=
"style"
:selectable=
"true"
></u-parse>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -20,7 +23,20 @@
...
@@ -20,7 +23,20 @@
data
()
{
data
()
{
return
{
return
{
title
:
''
,
title
:
''
,
body
:
''
body
:
''
,
time
:
''
,
style
:
{
// 字符串的形式
p
:
`
color: #666666;
font-size: 24rpx;
letter-spacing: 0.03rpx;
`
,
span
:
'font-size: 26rpx'
,
img
:
`
padding: 40rpx 0;
`
,
},
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -30,6 +46,7 @@
...
@@ -30,6 +46,7 @@
eventChannel
.
on
(
'acceptDataFromLearn'
,
function
(
data
)
{
eventChannel
.
on
(
'acceptDataFromLearn'
,
function
(
data
)
{
that
.
title
=
data
.
title
;
that
.
title
=
data
.
title
;
that
.
body
=
data
.
body
;
that
.
body
=
data
.
body
;
that
.
time
=
data
.
create_at
})
})
this
.
$u
.
mpShare
.
path
=
''
this
.
$u
.
mpShare
.
path
=
''
},
},
...
@@ -37,18 +54,27 @@
...
@@ -37,18 +54,27 @@
</
script
>
</
script
>
<
style
>
<
style
>
.news-wrap
{
background-color
:
#FFFFFF
;
height
:
100vh
;
}
.title
{
.title
{
font-size
:
3
2
rpx
;
font-size
:
3
6
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
margin-left
:
30
rpx
;
margin
:
20
rpx
30
rpx
;
margin-top
:
30
rpx
;
}
.time-txt
{
margin
:
0
30
rpx
;
font-size
:
24
rpx
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
24
rpx
;
}
}
.u-content
{
.u-content
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
line-height
:
36
rpx
;
line-height
:
36
rpx
;
color
:
#666666
;
color
:
#666666
;
margin-left
:
30
rpx
;
margin-left
:
30
rpx
;
margin-top
:
30
rpx
;
margin-right
:
30
rpx
;
margin-right
:
30
rpx
;
}
}
</
style
>
</
style
>
src/pages/learn/section.vue
View file @
76aa12f2
<
template
>
<
template
v-cloak
>
<view
class=
""
>
<view
class=
""
>
<view
class=
"learn-vedio"
>
<view
class=
"learn-vedio"
v-if=
"version && loaded"
>
<u-navbar
back-icon-color=
"#000000"
:background=
"background"
title-color=
"#000000"
:border-bottom=
"false"
>
<u-navbar
back-icon-color=
"#000000"
:background=
"background"
title-color=
"#000000"
:border-bottom=
"false"
>
</u-navbar>
</u-navbar>
<view
class=
"uni-padding-wrap uni-common-mt"
>
<view
class=
"uni-padding-wrap uni-common-mt"
>
...
@@ -48,6 +48,11 @@
...
@@ -48,6 +48,11 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
v-else-if=
"loaded"
>
<u-navbar
back-icon-color=
"#000000"
:background=
"background"
title-color=
"#000000"
:border-bottom=
"false"
>
</u-navbar>
<view
style=
"text-align: center;"
>
暂无数据
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -100,7 +105,9 @@
...
@@ -100,7 +105,9 @@
scrollTop
:
null
scrollTop
:
null
},
},
scrollValue
:
0
,
scrollValue
:
0
,
nowTime
:
0
nowTime
:
0
,
version
:
true
,
loaded
:
false
};
};
},
},
computed
:
{
computed
:
{
...
@@ -109,18 +116,37 @@
...
@@ -109,18 +116,37 @@
},
},
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
getVersion
();
getApp
().
trackPage
(
'学习视频详情页'
)
getApp
().
trackPage
(
'学习视频详情页'
)
if
(
e
){
this
.
section_id
=
e
.
section_id
this
.
section_id
=
e
.
section_id
this
.
params
.
course_id
=
e
.
course_id
this
.
params
.
course_id
=
e
.
course_id
this
.
getCapterDetails
()
this
.
getCapterDetails
()
this
.
getSectionInfo
({
this
.
getSectionInfo
({
section_id
:
e
.
section_id
section_id
:
e
.
section_id
})
})
}
},
},
onReady
:
function
(
res
)
{
onReady
:
function
(
res
)
{
this
.
videoContext
=
uni
.
createVideoContext
(
"courseVideo"
);
this
.
videoContext
=
uni
.
createVideoContext
(
"courseVideo"
);
},
},
methods
:
{
methods
:
{
getVersion
()
{
let
version
=
process
.
uniEnv
.
version_number
;
let
that
=
this
;
this
.
$u
.
api
.
getVersionInfo
(
version
)
.
then
((
res
)
=>
{
that
.
loaded
=
true
let
data
=
res
.
data
;
if
(
data
.
hasOwnProperty
(
'is_audit'
)
&&
data
.
is_audit
==
0
){
that
.
version
=
false
}
})
.
catch
((
err
)
=>
{
that
.
loaded
=
true
});
},
scroll
:
function
(
e
)
{
scroll
:
function
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
},
},
...
...
src/pages/login/index.vue
View file @
76aa12f2
<
template
>
<
template
>
<view
class=
""
>
<view
class=
""
>
<!--
<w-navbar></w-navbar>
-->
<view
class=
"backView"
>
<view
class=
"backView"
>
<view
class=
"login-block"
v-if=
"needAuth"
>
<view
class=
"login-block"
v-if=
"needAuth"
>
<u-image
class=
"u-flex u-row-center logo"
:src=
"logo"
width=
"200"
height=
"200"
>
<u-image
:fade=
"false"
class=
"u-flex u-row-center logo"
:src=
"logo"
width=
"200"
height=
"200"
>
<u-loading
slot=
"loading"
></u-loading>
<u-loading
slot=
"loading"
></u-loading>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
</u-image>
</u-image>
<u-image
class=
"u-flex u-row-center logo2"
:src=
"logo2"
width=
"214"
height=
"60"
>
<u-image
:fade=
"false"
class=
"u-flex u-row-center logo2"
:src=
"logo2"
width=
"214"
height=
"60"
>
<u-loading
slot=
"loading"
></u-loading>
<u-loading
slot=
"loading"
></u-loading>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
</u-image>
</u-image>
</view>
</view>
<view
class=
"bind-block"
v-else
>
<view
class=
"bind-block"
v-else
>
<u-image
class=
"u-flex u-row-between logo"
:src=
"logo"
width=
"148"
height=
"148"
>
<u-image
:fade=
"false"
class=
"u-flex u-row-between logo"
:src=
"logo"
width=
"148"
height=
"148"
>
<u-loading
slot=
"loading"
></u-loading>
<u-loading
slot=
"loading"
></u-loading>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
</u-image>
</u-image>
<view
class=
"bind-phone"
>
{{
bindPhone
}}
</view>
<view
class=
"bind-phone"
>
{{
bindPhone
}}
</view>
<view
class=
"bind-tips"
>
{{
bindTips
}}
</view>
<view
class=
"bind-tips"
>
{{
bindTips
}}
</view>
</view>
</view>
<u-gap
height=
"
57
0"
></u-gap>
<u-gap
height=
"
48
0"
></u-gap>
<button
class=
"loginBtn"
v-if=
"needAuth"
lang=
"zh_CN"
@
tap=
"getUserProfile"
>
<button
class=
"loginBtn"
v-if=
"needAuth"
lang=
"zh_CN"
@
tap=
"getUserProfile"
>
<text
class=
"u-font-32 white"
>
{{
loginTitle
}}
</text>
<text
class=
"u-font-32 white"
>
{{
loginTitle
}}
</text>
</button>
</button>
...
@@ -38,7 +39,6 @@ const app = getApp()
...
@@ -38,7 +39,6 @@ const app = getApp()
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
qnPath
:
process
.
uniEnv
.
qn_base_url
,
needAuth
:
true
,
needAuth
:
true
,
TimeID
:
-
1
,
TimeID
:
-
1
,
loginTitle
:
'用户登录'
,
loginTitle
:
'用户登录'
,
...
@@ -50,10 +50,10 @@ export default {
...
@@ -50,10 +50,10 @@ export default {
},
},
computed
:
{
computed
:
{
logo
()
{
logo
()
{
return
util
.
imageCache
(
this
,
'logo.png'
)
return
this
.
qnFile
(
'logo.png'
)
},
},
logo2
()
{
logo2
()
{
return
util
.
imageCache
(
this
,
'logo-2.png'
)
return
this
.
qnFile
(
'logo-2.png'
)
},
},
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
...
@@ -67,6 +67,9 @@ export default {
...
@@ -67,6 +67,9 @@ export default {
this
.
getCode
()
this
.
getCode
()
},
},
methods
:
{
methods
:
{
qnFile
(
src
)
{
return
process
.
uniEnv
.
qn_base_url
+
src
},
async
getCode
()
{
async
getCode
()
{
login
.
appLogin
().
then
(
res
=>
{
login
.
appLogin
().
then
(
res
=>
{
this
.
code
=
res
.
code
this
.
code
=
res
.
code
...
@@ -160,7 +163,7 @@ export default {
...
@@ -160,7 +163,7 @@ export default {
login
.
signup
(
params
).
then
(
res
=>
{
login
.
signup
(
params
).
then
(
res
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
if
(
res
)
{
if
(
res
)
{
app
.
setUserData
(
res
.
data
,
that
)
login
.
setUserData
(
res
.
data
,
that
)
app
.
track
(
'signup_login'
,
{
mobile
:
res
.
data
.
mobile
});
app
.
track
(
'signup_login'
,
{
mobile
:
res
.
data
.
mobile
});
app
.
profileSet
(
that
)
app
.
profileSet
(
that
)
app
.
profileAppend
(
that
)
app
.
profileAppend
(
that
)
...
@@ -171,11 +174,11 @@ export default {
...
@@ -171,11 +174,11 @@ export default {
title
:
'授权失败,请重新授权'
,
title
:
'授权失败,请重新授权'
,
icon
:
'none'
icon
:
'none'
});
});
th
is
.
setLoginStatus
(
false
)
th
at
.
setLoginStatus
(
false
)
}
}
}).
catch
(
res
=>
{
}).
catch
(
res
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
th
is
.
setLoginStatus
(
false
)
th
at
.
setLoginStatus
(
false
)
})
})
},
},
fail
()
{
fail
()
{
...
@@ -184,7 +187,7 @@ export default {
...
@@ -184,7 +187,7 @@ export default {
}
}
})
})
}
else
{
}
else
{
th
is
.
toLogin
(
params
)
th
at
.
toLogin
(
params
)
}
}
}
else
{
}
else
{
uni
.
showModal
({
uni
.
showModal
({
...
...
src/pages/mine/wallet/index.vue
View file @
76aa12f2
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
:border-bottom=
"false"
title-bold
></u-navbar>
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"wallet-content-view"
>
<view
class=
"wallet-content-view"
>
<view
class=
"header-view"
>
<view
class=
"header-view"
>
<image
class=
"header-image"
:src=
"q
ianbaobeijing
"
></image>
<image
class=
"header-image"
:src=
"q
nFile('qianbaobeijing.png')
"
></image>
</view>
</view>
<view
class=
"survey-view"
>
<view
class=
"survey-view"
>
<view
class=
"survey-top-view"
>
<view
class=
"survey-top-view"
>
...
@@ -109,9 +109,6 @@
...
@@ -109,9 +109,6 @@
imageUrl
()
{
imageUrl
()
{
return
process
.
uniEnv
.
qn_base_url
return
process
.
uniEnv
.
qn_base_url
},
},
qianbaobeijing
()
{
return
util
.
imageCache
(
this
,
'qianbaobeijing.png'
)
},
buttonStyle
()
{
buttonStyle
()
{
return
{
return
{
width
:
"200rpx"
,
width
:
"200rpx"
,
...
@@ -139,6 +136,9 @@
...
@@ -139,6 +136,9 @@
this
.
loadStatement
()
this
.
loadStatement
()
},
},
methods
:
{
methods
:
{
qnFile
(
src
)
{
return
process
.
uniEnv
.
qn_base_url
+
src
},
// 提现
// 提现
handleClickWithdraw
()
{
handleClickWithdraw
()
{
this
.
$u
.
route
({
this
.
$u
.
route
({
...
...
src/pages/mine/wallet/settlement.vue
View file @
76aa12f2
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<image
:src=
"
liushuibeijingImage
"
class=
"head-back-image"
mode=
"widthFix"
></image>
<image
:src=
"
qnFile('liushuibeijing.png')
"
class=
"head-back-image"
mode=
"widthFix"
></image>
<view
class=
"list-view"
v-if=
"hasInfo"
>
<view
class=
"list-view"
v-if=
"hasInfo"
>
<view
class=
"u-flex u-row-center"
v-if=
"loading"
>
<view
class=
"u-flex u-row-center"
v-if=
"loading"
>
<u-gap
height=
"20"
></u-gap>
<u-gap
height=
"20"
></u-gap>
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</view>
</view>
</view>
</view>
<view
class=
"list-view-empty"
v-else
>
<view
class=
"list-view-empty"
v-else
>
<u-image
class=
"empty-image"
:src=
"banner"
width=
"374"
height=
"246"
mode=
"widthFix"
:fade=
"
true"
duration=
"450
"
>
<u-image
class=
"empty-image"
:src=
"banner"
width=
"374"
height=
"246"
mode=
"widthFix"
:fade=
"
false
"
>
<u-loading
slot=
"loading"
></u-loading>
<u-loading
slot=
"loading"
></u-loading>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
</u-image>
</u-image>
...
@@ -64,9 +64,6 @@
...
@@ -64,9 +64,6 @@
}
}
},
},
computed
:
{
computed
:
{
liushuibeijingImage
()
{
return
util
.
imageCache
(
this
,
'liushuibeijing.png'
)
},
imageUrl
()
{
imageUrl
()
{
return
process
.
uniEnv
.
qn_base_url
return
process
.
uniEnv
.
qn_base_url
},
},
...
@@ -74,7 +71,7 @@
...
@@ -74,7 +71,7 @@
return
this
.
loading
||
this
.
info
.
payableRecordExtendDtos
&&
this
.
info
.
payableRecordExtendDtos
.
length
return
this
.
loading
||
this
.
info
.
payableRecordExtendDtos
&&
this
.
info
.
payableRecordExtendDtos
.
length
},
},
banner
()
{
banner
()
{
return
util
.
imageCache
(
this
,
'receipt.png'
)
return
this
.
qnFile
(
'receipt.png'
)
},
},
},
},
onLoad
()
{
onLoad
()
{
...
@@ -82,6 +79,9 @@
...
@@ -82,6 +79,9 @@
this
.
loadPayRecord
()
this
.
loadPayRecord
()
},
},
methods
:
{
methods
:
{
qnFile
(
src
)
{
return
process
.
uniEnv
.
qn_base_url
+
src
},
async
loadPayRecord
()
{
async
loadPayRecord
()
{
let
self
=
this
let
self
=
this
self
.
loading
=
true
self
.
loading
=
true
...
...
src/pages/mine/wallet/statement.vue
View file @
76aa12f2
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<image
:src=
"
liushuibeijingImage
"
class=
"head-back-image"
mode=
"widthFix"
></image>
<image
:src=
"
qnFile('liushuibeijing.png')
"
class=
"head-back-image"
mode=
"widthFix"
></image>
<view
class=
"list-view"
v-if=
"hasInfo"
>
<view
class=
"list-view"
v-if=
"hasInfo"
>
<view
class=
"u-flex u-row-center"
v-if=
"loading"
>
<view
class=
"u-flex u-row-center"
v-if=
"loading"
>
<u-gap
height=
"20"
></u-gap>
<u-gap
height=
"20"
></u-gap>
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</view>
</view>
</view>
</view>
<view
class=
"list-view-empty"
v-else
>
<view
class=
"list-view-empty"
v-else
>
<u-image
class=
"empty-image"
:src=
"banner"
width=
"374"
height=
"246"
mode=
"widthFix"
:fade=
"
true"
duration=
"450
"
>
<u-image
class=
"empty-image"
:src=
"banner"
width=
"374"
height=
"246"
mode=
"widthFix"
:fade=
"
false
"
>
<u-loading
slot=
"loading"
></u-loading>
<u-loading
slot=
"loading"
></u-loading>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
</u-image>
</u-image>
...
@@ -84,14 +84,11 @@
...
@@ -84,14 +84,11 @@
}
}
},
},
liushuibeijingImage
()
{
return
util
.
imageCache
(
this
,
'liushuibeijing.png'
)
},
imageUrl
()
{
imageUrl
()
{
return
process
.
uniEnv
.
qn_base_url
return
process
.
uniEnv
.
qn_base_url
},
},
banner
()
{
banner
()
{
return
util
.
imageCache
(
this
,
'receipt.png'
)
return
this
.
qnFile
(
'receipt.png'
)
},
},
hasInfo
()
{
hasInfo
()
{
return
this
.
loading
||
this
.
data
.
statementList
&&
this
.
data
.
statementList
.
length
return
this
.
loading
||
this
.
data
.
statementList
&&
this
.
data
.
statementList
.
length
...
@@ -102,6 +99,9 @@
...
@@ -102,6 +99,9 @@
this
.
loadStatement
()
this
.
loadStatement
()
},
},
methods
:
{
methods
:
{
qnFile
(
src
)
{
return
process
.
uniEnv
.
qn_base_url
+
src
},
bindDateChange
:
function
(
e
)
{
bindDateChange
:
function
(
e
)
{
this
.
date
=
e
.
target
.
value
this
.
date
=
e
.
target
.
value
this
.
loadStatement
()
this
.
loadStatement
()
...
...
src/pages/order/complete copy.vue
deleted
100644 → 0
View file @
188113e5
This diff is collapsed.
Click to expand it.
src/pages/order/detail.vue
View file @
76aa12f2
This diff is collapsed.
Click to expand it.
src/utils/util.js
View file @
76aa12f2
...
@@ -39,10 +39,10 @@ function validImages(imgurl) {
...
@@ -39,10 +39,10 @@ function validImages(imgurl) {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
getImageInfo
({
uni
.
getImageInfo
({
src
:
imgurl
,
src
:
imgurl
,
success
(
res
)
{
success
(
res
)
{
resolve
(
true
)
resolve
(
true
)
},
},
fail
()
{
fail
()
{
reject
(
false
)
reject
(
false
)
}
}
})
})
...
@@ -58,7 +58,6 @@ function validImages(imgurl) {
...
@@ -58,7 +58,6 @@ function validImages(imgurl) {
const
imageCache
=
async
function
(
vm
,
src
,
host
)
{
const
imageCache
=
async
function
(
vm
,
src
,
host
)
{
host
=
host
||
process
.
uniEnv
.
qn_base_url
host
=
host
||
process
.
uniEnv
.
qn_base_url
let
image_url
=
host
+
src
let
image_url
=
host
+
src
return
image_url
// 临时
let
image_name
=
md5Libs
.
md5
(
image_url
)
let
image_name
=
md5Libs
.
md5
(
image_url
)
var
arr
=
Object
.
keys
(
vm
.
vuex_cache
);
var
arr
=
Object
.
keys
(
vm
.
vuex_cache
);
const
result
=
await
validImages
(
vm
.
vuex_cache
[
image_name
])
const
result
=
await
validImages
(
vm
.
vuex_cache
[
image_name
])
...
@@ -70,7 +69,6 @@ const imageCache = async function (vm, src, host) {
...
@@ -70,7 +69,6 @@ const imageCache = async function (vm, src, host) {
url
:
image_url
,
url
:
image_url
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
if
(
res
.
statusCode
===
200
)
{
if
(
res
.
statusCode
===
200
)
{
// call_back(res.tempFilePath)
vm
.
$u
.
vuex
(
`vuex_cache.
${
image_name
}
`
,
res
.
tempFilePath
)
vm
.
$u
.
vuex
(
`vuex_cache.
${
image_name
}
`
,
res
.
tempFilePath
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment