Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lumastoreapp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xieyishang
lumastoreapp
Commits
59783790
Commit
59783790
authored
Feb 22, 2021
by
xieyishang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
‘addxx
parent
1a09da2f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1094 additions
and
27 deletions
+1094
-27
.hbuilderx/launch.json
.hbuilderx/launch.json
+11
-0
components/empty/empty.vue
components/empty/empty.vue
+26
-12
components/multiple-select/multiple-select.vue
components/multiple-select/multiple-select.vue
+324
-0
pages.json
pages.json
+14
-1
pages/index/index.vue
pages/index/index.vue
+39
-12
pages/myStockRight/myStockRight.scss
pages/myStockRight/myStockRight.scss
+250
-0
pages/myStockRight/myStockRight.vue
pages/myStockRight/myStockRight.vue
+422
-0
static/thighicon.png
static/thighicon.png
+0
-0
utils/api/api.js
utils/api/api.js
+6
-0
utils/debug.js
utils/debug.js
+2
-2
No files found.
.hbuilderx/launch.json
0 → 100644
View file @
59783790
{
//
launch.json
配置了启动调试时相关设置,configurations下节点名称可为
app-plus/h
5
/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp
-360
/
//
launchtype项可配置值为local或remote
,
local代表前端连本地云函数,remote代表前端连云端云函数
"version"
:
"0.0"
,
"configurations"
:
[{
"type"
:
"uniCloud"
,
"default"
:
{
"launchtype"
:
"remote"
}
}
]
}
components/empty/empty.vue
View file @
59783790
<
template
>
<
template
>
<!-- 空空如也的组件 -->
<!-- 空空如也的组件 -->
<view
class=
"kkruycomponents"
>
<view
class=
"kkruycomponents"
>
<view
class=
"onlistimgbox"
>
<view
class=
"onlistimgbox"
>
<image
class=
"onimgs"
:src=
"uploadurl+'/static/applet5/images/uts/meiyoule.png'"
mode=
""
></image>
<image
class=
"onimgs"
:src=
"joinurl+'/images/wm/meiyou.png'"
mode=
""
></image>
<view
class=
"nulltext"
>
{{
msgs
}}
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
(){
props
:
{
msgs
:
{
type
:
String
,
default
:
"
空空如也
"
}
},
data
()
{
return
{
return
{
}
}
},
},
computed
:
{
computed
:
{
staticUrl
()
{
//静态资源地址
staticUrl
()
{
//静态资源地址
return
this
.
$store
.
state
.
staticUrl
;
return
this
.
$store
.
state
.
staticUrl
;
},
},
staticUrl1
()
{
//静态资源地址
staticUrl1
()
{
//静态资源地址
return
this
.
$store
.
state
.
staticUrl1
;
return
this
.
$store
.
state
.
staticUrl1
;
},
},
uploadurl
()
{
joinurl
()
{
return
this
.
$store
.
state
.
upload
url
;
return
this
.
$store
.
state
.
join
url
;
}
}
},
},
methods
:{
methods
:
{
}
}
}
}
</
script
>
</
script
>
...
@@ -37,11 +44,18 @@
...
@@ -37,11 +44,18 @@
margin-top
:
190upx
;
margin-top
:
190upx
;
.onimgs
{
.onimgs
{
width
:
250px
;
width
:
250px
;
height
:
225
px
;
height
:
180
px
;
}
}
.names
{
.names
{
font-size
:
39upx
;
font-size
:
39upx
;
color
:rgba
(
167
,
166
,
171
,
1
)
;
color
:rgba
(
167
,
166
,
171
,
1
)
;
}
}
.nulltext
{
margin-top
:
16px
;
padding
:
0
60px
;
color
:
#969799
;
font-size
:
14px
;
line-height
:
20px
;
}
}
}
</
style
>
</
style
>
components/multiple-select/multiple-select.vue
0 → 100644
View file @
59783790
<
template
>
<view
class=
"select-container"
v-show=
"show"
@
touchmove
.
stop
.
prevent
>
<view
class=
"mask"
:class=
"activeClass ? 'mask-show' : ''"
@
tap=
"onCancel(true)"
></view>
<view
class=
"select-box"
:class=
"activeClass ? 'select-box-show' : ''"
>
<view
class=
"header"
>
<text
class=
"cancel"
@
tap=
"onCancel"
>
{{
cancelText
}}
</text>
<view
class=
"all"
@
tap=
"onAllToggle"
v-if=
"allShow"
>
<text
:class=
"isAll ? 'all-active' : ''"
>
全选
</text>
</view>
<text
class=
"confirm"
@
tap=
"onConfirm"
>
{{
confirmText
}}
</text>
</view>
<view
class=
"body-warp"
>
<scroll-view
class=
"body"
scroll-y=
"true"
>
<slot
v-if=
"!data.length"
name=
"tips"
>
<view
class=
"empty-tips"
>
暂无数据~
</view>
</slot>
<view
class=
"select-item"
:class=
"[item.disabled ? 'disabled' : '',selectedArr[index] ? 'selected' : '']"
v-for=
"(item,index) in data"
:key=
"item[valueName]"
@
tap=
"onSelected(index)"
>
<view
class=
"label"
>
{{
item
[
labelName
]
}}
</view>
<text
v-show=
"selectedArr[index]"
class=
"selected-icon"
>
✔
</text>
</view>
</scroll-view>
</view>
</view>
</view>
</
template
>
<!-- 多选组件 -->
<
script
>
export
default
{
model
:
{
prop
:
"
value
"
,
event
:
[
"
input
"
]
},
data
()
{
return
{
show
:
false
,
//是否显示
activeClass
:
false
,
//激活样式状态
selectedArr
:
[],
//选择对照列表
selectedArrOld
:
[]
//选择对照列表上一次的数据
};
},
onShow
()
{
this
.
show
=
this
.
value
;
},
computed
:
{
// 返回是否全选
isAll
()
{
let
wipeDisabledList
=
this
.
returnWipeDisabledList
();
if
(
!
wipeDisabledList
.
length
)
return
false
;
return
!
wipeDisabledList
.
includes
(
false
);
}
},
props
:
{
// 双向绑定
value
:
{
type
:
Boolean
,
default
:
false
},
// 取消按钮文字
cancelText
:
{
type
:
String
,
default
:
"
取消
"
},
// 确认按钮文字
confirmText
:
{
type
:
String
,
default
:
"
确认
"
},
// label对应的key名称
labelName
:
{
type
:
String
,
default
:
"
label
"
},
// value对应的key名称
valueName
:
{
type
:
String
,
default
:
"
value
"
},
// 是否允许点击遮罩层关闭
maskCloseAble
:
{
type
:
Boolean
,
default
:
true
},
// 是否显示全选
allShow
:
{
type
:
Boolean
,
default
:
true
},
// 模式
mode
:
{
type
:
String
,
default
:
"
multiple
"
},
// 默认选中值
defaultSelected
:
{
type
:
Array
,
default
:
function
()
{
return
[];
}
},
// 数据源
data
:
{
type
:
Array
,
required
:
true
,
default
:
()
=>
{
return
[];
}
}
},
watch
:
{
async
value
(
newVal
)
{
this
.
show
=
newVal
;
await
this
.
$nextTick
();
this
.
activeClass
=
newVal
;
if
(
newVal
)
{
this
.
selectedArrOld
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
selectedArr
));
}
},
show
(
newVal
)
{
this
.
$emit
(
"
input
"
,
newVal
);
this
.
$emit
(
"
change
"
,
newVal
);
},
data
:
{
// 设置初始选择对照列表
handler
(
list
)
{
this
.
selectedArr
=
list
.
map
(
el
=>
false
);
this
.
setItemActiveState
();
},
deep
:
true
,
immediate
:
true
},
defaultSelected
:
{
handler
()
{
this
.
setItemActiveState
();
},
deep
:
true
,
immediate
:
true
}
},
methods
:
{
// 设置默认选中通用办法
setItemActiveState
()
{
if
(
this
.
data
.
length
&&
this
.
defaultSelected
.
length
)
{
this
.
data
.
forEach
((
item
,
i
)
=>
{
for
(
let
n
=
0
;
n
<
this
.
defaultSelected
.
length
;
n
++
)
{
if
(
!
item
.
disabled
&&
item
[
this
.
valueName
]
===
this
.
defaultSelected
[
n
]
)
{
this
.
selectedArr
.
splice
(
i
,
1
,
true
);
break
;
}
}
});
}
},
/**
* 选择事件
* @index {Number} 点击下标
*/
onSelected
(
index
)
{
if
(
this
.
data
[
index
].
disabled
)
return
;
let
index2Active
=
this
.
selectedArr
[
index
];
this
.
selectedArr
.
splice
(
index
,
1
,
!
index2Active
);
},
// 取消事件
onCancel
(
isMask
)
{
if
(
!
isMask
||
this
.
maskCloseAble
)
{
this
.
show
=
false
;
this
.
selectedArr
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
selectedArrOld
));
}
else
{
return
;
}
this
.
$emit
(
"
cancel
"
);
},
// 返回去除了disabled状态后的对照列表
returnWipeDisabledList
()
{
let
arr
=
[];
this
.
selectedArr
.
forEach
((
el
,
index
)
=>
{
if
(
!
this
.
data
[
index
].
disabled
)
arr
.
push
(
el
);
});
return
arr
;
},
// 全选/非全选事件
onAllToggle
()
{
let
wipeDisabledList
=
this
.
returnWipeDisabledList
();
// 如果去除了disabled的对照列表有false的数据,代表未全选
if
(
wipeDisabledList
.
includes
(
false
))
{
this
.
selectedArr
.
forEach
((
el
,
index
)
=>
{
if
(
!
this
.
data
[
index
].
disabled
)
this
.
selectedArr
.
splice
(
index
,
1
,
true
);
});
}
else
{
this
.
selectedArr
.
forEach
((
el
,
index
)
=>
{
if
(
!
this
.
data
[
index
].
disabled
)
el
=
this
.
selectedArr
.
splice
(
index
,
1
,
false
);
});
}
},
// 确定事件
onConfirm
()
{
this
.
show
=
false
;
let
selectedData
=
[];
this
.
selectedArr
.
forEach
((
el
,
index
)
=>
{
if
(
el
)
{
selectedData
.
push
(
this
.
data
[
index
]);
}
});
if
(
this
.
mode
===
"
multiple
"
)
{
this
.
$emit
(
"
confirm
"
,
selectedData
);
}
else
{
let
backData
=
selectedData
[
0
]
||
{};
this
.
$emit
(
"
confirm
"
,
backData
);
}
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.select-container
{
width
:
100vw
;
height
:
100vh
;
position
:
fixed
;
left
:
0
;
top
:
0
;
z-index
:
999
;
$paddingLR
:
18rpx
;
.mask
{
width
:
100%
;
height
:
100%
;
background-color
:
$uni-bg-color-mask
;
opacity
:
0
;
transition
:
opacity
0
.3s
;
&
.mask-show
{
opacity
:
1
;
}
}
// 选择器内容区域
.select-box
{
width
:
100%
;
position
:
absolute
;
bottom
:
0
;
left
:
0
;
transform
:
translate3d
(
0px
,
100%
,
0px
);
background-color
:
$uni-bg-color
;
transition
:
all
0
.3s
;
&
.select-box-show
{
transform
:
translateZ
(
0
);
}
.header
{
display
:
flex
;
box-sizing
:
border-box
;
width
:
100%
;
justify-content
:
space-between
;
border-bottom
:
1px
solid
$uni-border-color
;
line-height
:
76rpx
;
font-size
:
30rpx
;
padding
:
0
$paddingLR
;
.cancel
{
color
:
$uni-text-color-grey
;
}
.all
{
color
:
$uni-color-success
;
.all-active
{
&
:
:
after
{
display
:
inline-block
;
content
:
"✔"
;
padding-left
:
8rpx
;
}
}
}
.confirm
{
color
:
$uni-color-primary
;
}
}
.body-warp
{
width
:
100%
;
height
:
30vh
;
box-sizing
:
border-box
;
padding
:
20rpx
$paddingLR
;
}
.body
{
width
:
100%
;
height
:
100%
;
overflow-y
:
auto
;
.empty-tips
{
margin-top
:
25%
;
text-align
:
center
;
font-size
:
26rpx
;
color
:
$uni-color-error
;
}
.select-item
{
display
:
flex
;
font-size
:
26rpx
;
line-height
:
58rpx
;
color
:
#303133
;
position
:
relative
;
transition
:
all
0
.3s
;
&
.selected
{
color
:
$uni-color-primary
;
}
&
.disabled
{
color
:
$uni-text-color-disable
;
}
>
.label
{
flex
:
1
;
text-align
:
center
;
}
>
.selected-icon
{
position
:
absolute
;
right
:
0
;
top
:
50%
;
transform
:
translateY
(
-50%
);
}
}
}
}
}
</
style
>
\ No newline at end of file
pages.json
View file @
59783790
...
@@ -517,7 +517,20 @@
...
@@ -517,7 +517,20 @@
"enablePullDownRefresh"
:
true
"enablePullDownRefresh"
:
true
}
}
}
},
{
"path"
:
"pages/myStockRight/myStockRight"
,
"style"
:
{
"navigationBarTitleText"
:
"我的股票"
,
"navigationBarBackgroundColor"
:
"#F64F15"
,
"navigationBarTextStyle"
:
"white"
,
"enablePullDownRefresh"
:
false
,
"app-plus"
:
{
"scrollIndicator"
:
"none"
}
}
}
],
],
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTextStyle"
:
"black"
,
...
...
pages/index/index.vue
View file @
59783790
...
@@ -88,17 +88,17 @@
...
@@ -88,17 +88,17 @@
<view
class=
"shuju_01_s"
v-if=
"countdata.yesterday_cash"
>
¥
{{
countdata
.
yesterday_cash
}}
</view>
<view
class=
"shuju_01_s"
v-if=
"countdata.yesterday_cash"
>
¥
{{
countdata
.
yesterday_cash
}}
</view>
<view
class=
"shuju_01_s"
v-else
>
¥0
</view>
<view
class=
"shuju_01_s"
v-else
>
¥0
</view>
</view>
</view>
</navigator>
</navigator>
<!--
<navigator
url=
"/pages"
class=
"shuju"
>
<view
class=
"shuju_01"
>
<!--
<view
class=
"flex"
v-if=
"amount_piao!=0 && amount_piao!='0.00' && amount_piao!=''&& amount_piao!=null"
>
<view
class=
"shuju_01 "
>
<view>
我的股票
</view>
<view>
我的股票
</view>
<view
class=
"shuju_01_s"
>
{{
amount_piao
}}
</view>
</view>
</view>
<view
class=
"shuju_01 no"
>
</view>
-->
<view>
我的股权
</view>
</view>
</navigator>
-->
<view
class=
"BH"
></view>
<view
class=
"BH"
></view>
...
@@ -345,8 +345,19 @@
...
@@ -345,8 +345,19 @@
</navigator>
</navigator>
</view>
</view>
<view
class=
"jiu_max"
v-if=
"amount_piao!=0 && amount_piao!='0.00' && amount_piao!=''&& amount_piao!=null"
>
<navigator
url=
"/pages/myStockRight/myStockRight"
>
<view
class=
"jiu_min"
>
<view>
<image
class=
"img"
src=
"/static/thighicon.png"
mode=
""
></image>
</view>
<view>
我的股票
</view>
</view>
</navigator>
</view>
<view
class=
"jiu_max "
v-if=
"shop_type == 'ele'"
>
<!--
<view
class=
"jiu_max "
v-if=
"shop_type == 'ele'"
>
<navigator
url=
"/pages/table_code/manageTableCode/manageTableCode"
>
<navigator
url=
"/pages/table_code/manageTableCode/manageTableCode"
>
<view
class=
"jiu_min"
>
<view
class=
"jiu_min"
>
<view>
<view>
...
@@ -355,7 +366,7 @@
...
@@ -355,7 +366,7 @@
<view>
餐台码
</view>
<view>
餐台码
</view>
</view>
</view>
</navigator>
</navigator>
</view>
</view>
-->
</view>
</view>
...
@@ -378,7 +389,8 @@
...
@@ -378,7 +389,8 @@
import
Welcome
from
"
@/components/Welcome/Welcome.vue
"
;
//欢迎回来
import
Welcome
from
"
@/components/Welcome/Welcome.vue
"
;
//欢迎回来
import
{
import
{
storeIndex
,
storeIndex
,
excel
excel
,
getLmguPiao
,
}
from
"
@/utils/api/api.js
"
;
}
from
"
@/utils/api/api.js
"
;
import
yomolUpgrade
from
'
@/components/yomol-upgrade/yomol-upgrade.vue
'
;
//升级组件
import
yomolUpgrade
from
'
@/components/yomol-upgrade/yomol-upgrade.vue
'
;
//升级组件
export
default
{
export
default
{
...
@@ -392,7 +404,9 @@
...
@@ -392,7 +404,9 @@
is_luck_draw
:
""
,
is_luck_draw
:
""
,
money_type
:
""
,
money_type
:
""
,
activity_type
:
0
,
activity_type
:
0
,
is_bld
:
''
is_bld
:
''
,
amount_piao
:
0
,
}
}
},
},
components
:
{
components
:
{
...
@@ -457,6 +471,8 @@
...
@@ -457,6 +471,8 @@
}
}
})
})
this
.
storeIndexfun
();
this
.
storeIndexfun
();
this
.
getLmguPiao
();
//获取商家股票信息
if
(
uni
.
getStorageSync
(
'
dwstatus
'
)
==
''
)
{
if
(
uni
.
getStorageSync
(
'
dwstatus
'
)
==
''
)
{
getApp
().
getnewsRemind
().
then
(
res
=>
{
getApp
().
getnewsRemind
().
then
(
res
=>
{
...
@@ -492,6 +508,17 @@
...
@@ -492,6 +508,17 @@
}
}
},
},
methods
:
{
methods
:
{
//获取商家的股票信息
async
getLmguPiao
(){
let
res
=
await
getLmguPiao
({
});
if
(
res
.
code
==
0
){
this
.
amount_piao
=
res
.
data
.
amount_piao
;
}
else
{
this
.
amount_piao
=
0
;
}
},
saoma
(
e
)
{
saoma
(
e
)
{
uni
.
scanCode
({
uni
.
scanCode
({
success
:
res
=>
{
success
:
res
=>
{
...
...
pages/myStockRight/myStockRight.scss
0 → 100644
View file @
59783790
/* pages/personal//stock_rightstwo/stock_rightstwo.wxss */
page
{
position
:
relative
;
background-color
:
#fff
!
important
;
}
.stock_rightstwo
{}
.stock_tabbox
{
border-bottom
:
1px
solid
#F0F0F0
;
background-color
:
#fff
;
height
:
100upx
;
}
.stock_rightstwo
.tabactives
{
color
:
#F64F15
;
}
.stock_tabitem
{
height
:
100upx
;
text-align
:
center
;
color
:
#000000
;
font-size
:
32upx
;
position
:
relative
;
font-weight
:
550
;
}
.stock_tabbox
.stock_tabitem
:nth-child
(
1
)
{
border-right
:
1px
solid
#E8E8E8
;
}
.stock_tabitem.actives
{
color
:
#F64F15
;
}
.
stock_tabitem
.
actives
:
:
after
{
content
:
""
;
height
:
5upx
;
width
:
150upx
;
background-color
:
#F64F15
;
position
:
absolute
;
bottom
:
0
;
left
:
50%
;
margin-left
:
-75upx
;
}
/* 我的股权 */
.mystock_tab
{
padding
:
50upx
0
0
0
;
background-color
:
#fff
;
}
.stocktiit
{
color
:
#F64F15
;
font-size
:
42upx
;
text-align
:
center
;
margin-bottom
:
36upx
;
font-weight
:
bold
;
}
/* 股权主要内容 */
.stock_rightmains
{
height
:
533upx
;
width
:
748upx
;
background-color
:
#fff
;
background-size
:
100%
;
background-repeat
:
no-repeat
;
padding-top
:
160upx
;
padding-left
:
50upx
;
padding-right
:
50upx
;
box-sizing
:
border-box
;
}
.srickleftest
{
/* width: 385upx; */
width
:
320upx
;
}
.srickrighttest
{
margin-left
:
auto
;
}
.srickleftest
.testitems
,
.srickrighttest
.testitems
{
font-size
:
18upx
;
color
:
#040000
;
margin-bottom
:
8upx
;
}
.stockpstest
{
margin-top
:
22upx
;
color
:
#040000
;
font-size
:
18upx
;
}
.chapterinfo
{
margin-top
:
-20upx
;
}
.officialseal
text
,
.printbox
text
{
color
:
#040000
;
font-size
:
17upx
;
}
.officialseal
.officialsealicon
{
width
:
136upx
;
height
:
136upx
;
}
.printbox
{
margin-left
:
18upx
;
}
.printbox
.printicon
{
width
:
69upx
;
height
:
69upx
;
}
/* 股权的ends */
/* 版权信息 */
.copyrightinfo
{
margin-top
:
60upx
;
text-align
:
center
;
}
.copyrightinfo
.copyrighttest
{
color
:
#000
;
font-size
:
24upx
;
margin-top
:
10upx
;
}
.copyrightinfo
.wechatqrcode
{
width
:
175upx
;
height
:
174upx
;
margin
:
0
auto
;
}
/* 版权信息end */
/* 股票信息 */
.sharesmain
{
height
:
536upx
;
width
:
750upx
;
background-repeat
:
no-repeat
;
background-size
:
cover
;
padding
:
64upx
32upx
;
box-sizing
:
border-box
;
}
.sharesmain
.sharestit
{
color
:
#FFFFFF
;
font-size
:
36upx
;
text-align
:
center
;
margin-bottom
:
20upx
;
}
.stocknum
{
color
:
#fff
;
font-size
:
36upx
;
text-align
:
center
;
}
.stocknum
.num
{
font-size
:
90upx
;
color
:
#fff
;
font-weight
:
bold
;
text-decoration
:
underline
;
}
.mystockinfos
{
margin-top
:
72upx
;
}
.mystockinfos
.infositme
{
color
:
#FFFFFF
;
font-size
:
32upx
;
margin-bottom
:
8upx
;
}
/* 股票信息end */
/* 保存图片 */
.preservationbtn
{
position
:
fixed
;
bottom
:
200upx
;
right
:
0
;
width
:
60upx
;
height
:
220upx
;
background-color
:
#F8C586
;
color
:
#E70000
;
text-align
:
center
;
font-size
:
34upx
;
font-weight
:
bold
;
border-radius
:
10upx
0
0
10upx
;
}
/* 画布 */
.hideCanvasView
{
position
:
relative
;
}
.hideCanvas
{
position
:
fixed
;
top
:
-99999upx
;
left
:
-99999upx
;
z-index
:
-99999
;
}
.custom-image
{
margin
:
80upx
;
}
/* 提示窗 */
.stockmsgs
{
width
:
100%
;
height
:
100rpx
;
line-height
:
100rpx
;
padding
:
0
24rpx
;
box-sizing
:
border-box
;
position
:
fixed
;
left
:
0
;
bottom
:
0
;
/* background: rgba(225, 64, 23, 0.7); */
background
:
#C70015
;
z-index
:
99999999999
;
color
:
#F4C278
;
font-weight
:
bold
;
font-size
:
30rpx
;
text-align
:
center
;
// animation: 1s ease 0.8s 1 normal both running fadeInUp;
}
.stockmsgs
.textnum
{
font-size
:
36rpx
;
font-weight
:
bold
;
}
@keyframes
fadeInUp
{
0
%
{
opacity
:
0
;
-webkit-transform
:
translate3d
(
0
,
400rpx
,
0
);
transform
:
translate3d
(
0
,
400rpx
,
0
);
}
100
%
{
opacity
:
1
;
-webkit-transform
:
none
;
transform
:
none
;
}
}
\ No newline at end of file
pages/myStockRight/myStockRight.vue
0 → 100644
View file @
59783790
<
template
>
<view
class=
""
>
<!--pages/personal//stock_rightstwo/stock_rightstwo.wxml-->
<view
class=
"stock_rightstwo"
>
<!-- tabend -->
<view
class=
"pagebody"
>
<!-- 我的股票 -->
<view
v-if=
"amount_piao!=0 && amount_piao!='' && amount_piao!=null && amount_piao!='0.00'"
class=
"mystock_tab"
>
<view
class=
"stocktiit"
>
恭喜您获得多思盈股票
</view>
<view
class=
"sharesmain"
:style=
"
{backgroundImage:'url('+joinurl+'/images/stock/sharesbg.png)'}">
<view
class=
"sharestit"
>
我的股票
</view>
<view
class=
"stocknum"
>
<text
class=
"num"
>
{{
amount_piao
?
amount_piao
:
0
}}
</text>
<text>
元/港元
</text>
</view>
<view
class=
"mystockinfos"
>
<view
class=
"infositme"
>
姓名:
{{
resdata
.
realname
}}
</view>
<view
class=
"infositme"
>
身份证号:
{{
resdata
.
identity_card
}}
</view>
<view
class=
"infositme"
>
签发日期:
{{
resdata
.
piao_sign_issue
}}
</view>
</view>
</view>
<!-- 股权内容ned -->
<view
class=
"copyrightinfo"
>
<image
class=
"wechatqrcode"
:src=
"joinurl+'/images/stock/wechatqrcode.png'"
></image>
<view
class=
"copyrighttest"
>
官方公众号
</view>
<view
class=
"copyrighttest"
>
全国服务热线:400-8073023
</view>
</view>
</view>
<!-- 我的股票 -->
<!-- 空空如也 -->
<empty
msgs=
"您没有获得多思盈股票"
v-if=
"(amount_piao=='' || amount_piao=='0' || amount_piao==null || amount_piao=='0.00')"
></empty>
<!--
<view
@
tap=
"saveImage"
v-if=
"tabactive==1 && resdata.lmgu!=0 && resdata.lmgu!='' && resdata.lmgu!=null && poster.finalPath"
class=
"preservationbtn flex ali-c"
>
保存图片
</view>
-->
<!--
<view
@
tap=
"saveImagetwo"
v-if=
"tabactive==2 && resdata.lmgupiao!=0 && resdata.lmgupiao!='' && resdata.lmgupiao!=null && postertwo.finalPath"
class=
"preservationbtn flex ali-c"
>
保存图片
</view>
-->
</view>
<!-- 股票 -->
<view
class=
"hideCanvasView"
>
<canvas
class=
"hideCanvas"
canvas-id=
"PosterCanvasIdtwo"
:style=
"
{width: (postertwo.width||10) + 'px', height: (postertwo.height||10) + 'px'}">
</canvas>
</view>
</view>
</view>
</
template
>
<
script
>
import
{
getLmguPiao
,
}
from
"
@/utils/api/api.js
"
;
import
empty
from
"
@/components/empty/empty.vue
"
;
//生成海报
import
_app
from
'
@/utils/QS-SharePoster/app.js
'
;
import
{
getSharePoster
}
from
'
@/utils/QS-SharePoster/QS-SharePoster.js
'
;
export
default
{
data
()
{
return
{
resdata
:
{},
tabactive
:
1
,
poster
:
{},
avaterSrc
:
''
,
//下载下来得背景图片
canvasId
:
'
default_PosterCanvasId
'
,
postertwo
:{},
avaterSrctwo
:
""
,
canvasIdtwo
:
"
PosterCanvasIdtwo
"
,
amount_piao
:
0
,
};
},
computed
:{
joinurl
(){
return
this
.
$store
.
state
.
joinurl
;
},
statictowUrl
(){
return
this
.
$store
.
state
.
statictowUrl
;
}
},
components
:{
},
onLoad
()
{
this
.
usersEquity
();
},
//过滤器
filters
:{
//需求的要给一段字符串里面 单独给数据加粗
getlmgu_msg
(
value
){
var
reg
=
/
[
0-9
]
+
(\.?[
0-9
]
+
)?\%?
/g
;
let
str
=
value
;
//'恭喜您再获得3999上市股票';
str
=
str
.
replace
(
reg
,
"
<span style='font-size: 48upx;font-weight: bold;'> $& </span>
"
);
console
.
log
(
str
)
return
str
;
}
},
methods
:{
//获取我的股权信息
async
usersEquity
(){
let
res
=
await
getLmguPiao
({});
//res.data.lmgu_code
if
(
res
.
code
==
0
){
this
.
resdata
=
res
.
data
.
user
;
this
.
amount_piao
=
res
.
data
.
amount_piao
;
if
(
!
res
.
data
.
user
.
lmgu
&&
!
res
.
data
.
user
.
lmgupiao
)
{
uni
.
showToast
({
title
:
'
股权信息不完整
'
,
icon
:
'
loading
'
,
duration
:
1000
});
uni
.
navigateBack
({
})
}
let
resdata
=
res
.
data
.
user
;
if
((
resdata
.
lmgu
==
0
||
resdata
.
lmgu
==
''
||
resdata
.
lmgu
==
null
)
&&
(
resdata
.
lmgupiao
!=
0
&&
resdata
.
lmgupiao
!=
''
&&
resdata
.
lmgupiao
!=
null
)){
this
.
tabactive
=
2
;
// this.shareFctwo();//先生成
}
else
{
// this.shareFc();//先生成
}
}
else
{
this
.
$api
.
msg
(
"
没有查询到您的股权信息
"
);
setTimeout
(()
=>
{
// uni.navigateBack({});
},
1000
)
}
},
saveImage
()
{
// #ifndef H5
uni
.
saveImageToPhotosAlbum
({
filePath
:
this
.
poster
.
finalPath
,
success
(
res
)
{
_app
.
showToast
(
'
保存成功
'
);
}
})
// #endif
// #ifdef H5
_app
.
showToast
(
'
保存了
'
);
// #endif
},
share
()
{
// #ifdef APP-PLUS
_app
.
getShare
(
false
,
false
,
2
,
''
,
''
,
''
,
this
.
poster
.
finalPath
,
false
,
false
);
// #endif
// #ifndef APP-PLUS
_app
.
showToast
(
'
分享了
'
);
// #endif
},
// 生成海报
// -------------------------------------------股票的生产海报end-------------------------------------
// -------------------------------------------股票的海报------------------------------------
async
shareFctwo
()
{
if
(
this
.
postertwo
.
finalPath
){
// this.saveImagetwo();//自动保存
return
false
;
}
// uni.showLoading({
// title:"请稍后.."
// })
try
{
_app
.
log
(
'
准备生成:
'
+
new
Date
())
const
d
=
await
getSharePoster
({
_this
:
this
,
//若在组件中使用 必传
backgroundImage
:
this
.
joinurl
+
"
/images/percenter/s0U829.png
"
,
type
:
'
testShareType
'
,
posterCanvasId
:
this
.
canvasIdtwo
,
//canvasId
delayTimeScale
:
20
,
//延时系数
drawArray
:
({
bgObj
,
type
,
bgScale
})
=>
{
console
.
info
(
`--------------
${
bgObj
.
width
}
---------------`
);
const
dx
=
bgObj
.
width
*
0.3
;
const
fontSize
=
bgObj
.
width
*
0.045
;
const
lineHeight
=
bgObj
.
height
*
0.04
;
//可直接return数组,也可以return一个promise对象, 但最终resolve一个数组, 这样就可以方便实现后台可控绘制海报
return
new
Promise
((
rs
,
rj
)
=>
{
rs
([
{
type
:
'
text
'
,
//标题
text
:
"
恭喜您获得多思盈股权
"
,
size
:
40
,
color
:
'
#F64F15
'
,
alpha
:
1
,
textAlign
:
'
center
'
,
fontWeight
:
'
bold
'
,
textBaseline
:
'
middle
'
,
infoCallBack
(
textLength
)
{
return
{
dy
:
90
,
dx
:
bgObj
.
width
/
2
,
}
}
},
//股权的背景
{
type
:
'
image
'
,
url
:
this
.
joinurl
+
"
/images/stock/sharesbg.png
"
,
textAlign
:
'
center
'
,
alpha
:
1
,
textAlign
:
'
center
'
,
textBaseline
:
'
middle
'
,
fontWeight
:
"
bold
"
,
dWidth
:
bgObj
.
width
,
dHeight
:
534
,
//500,
infoCallBack
(
textLength
)
{
return
{
dx
:
0
,
dy
:
150
}
}
},
//`持股姓名:网二###身份证号:340825199408052369###成立时间:2015年05月13日###公司地址:江西省南昌市青云谱区解放西路明珠广场B座2411室`
{
type
:
'
text
'
,
//文字
text
:
`我的股票`
,
size
:
30
,
color
:
'
#FFFFFF
'
,
alpha
:
1
,
textAlign
:
'
center
'
,
textBaseline
:
'
middle
'
,
infoCallBack
(
textLength
)
{
return
{
dx
:
bgObj
.
width
/
2
,
dy
:
250
}
}
},
{
type
:
'
text
'
,
//文字
text
:
`
${
this
.
resdata
.
lmgupiao
}
元/港元`
,
size
:
60
,
color
:
'
#FFFFFF
'
,
alpha
:
1
,
textAlign
:
'
center
'
,
textBaseline
:
'
middle
'
,
infoCallBack
(
textLength
)
{
return
{
dx
:
bgObj
.
width
/
2
,
dy
:
350
}
}
},
{
type
:
'
text
'
,
//文字
text
:
`姓名:
${
this
.
resdata
.
realname
}
`
,
size
:
30
,
color
:
'
#FFFFFF
'
,
alpha
:
1
,
textAlign
:
'
left
'
,
textBaseline
:
'
middle
'
,
infoCallBack
(
textLength
)
{
return
{
dx
:
40
,
dy
:
450
}
}
},
{
type
:
'
text
'
,
//文字
text
:
`身份证号:
${
this
.
resdata
.
identity_card
}
`
,
size
:
30
,
color
:
'
#FFFFFF
'
,
alpha
:
1
,
textAlign
:
'
left
'
,
textBaseline
:
'
middle
'
,
infoCallBack
(
textLength
)
{
return
{
dx
:
40
,
dy
:
450
+
45
*
1
}
}
},
{
type
:
'
text
'
,
//文字
text
:
`签发日期:
${
this
.
resdata
.
piao_sign_issue
}
`
,
size
:
30
,
color
:
'
#FFFFFF
'
,
alpha
:
1
,
textAlign
:
'
left
'
,
textBaseline
:
'
middle
'
,
infoCallBack
(
textLength
)
{
return
{
dx
:
40
,
dy
:
450
+
45
*
2
}
}
},
//底部二维码
{
type
:
'
image
'
,
url
:
this
.
joinurl
+
"
/images/stock/wechatqrcode.png
"
,
textAlign
:
'
center
'
,
alpha
:
1
,
textAlign
:
'
center
'
,
textBaseline
:
'
middle
'
,
fontWeight
:
"
bold
"
,
dWidth
:
200
,
dHeight
:
200
,
infoCallBack
(
textLength
)
{
return
{
dx
:
bgObj
.
width
/
2
-
100
,
dy
:
700
}
}
},
//二维码下面的文字
{
type
:
'
text
'
,
//日期
text
:
"
官方公众号
"
,
size
:
24
,
color
:
'
#000000
'
,
alpha
:
1
,
textAlign
:
'
center
'
,
textBaseline
:
'
middle
'
,
infoCallBack
(
textLength
)
{
return
{
dx
:
bgObj
.
width
/
2
,
dy
:
715
+
200
}
}
},
//二维码下面的文字
{
type
:
'
text
'
,
//日期
text
:
"
全国服务热线:400-8073023
"
,
size
:
24
,
color
:
'
#000000
'
,
alpha
:
1
,
textAlign
:
'
center
'
,
textBaseline
:
'
middle
'
,
infoCallBack
(
textLength
)
{
return
{
dx
:
bgObj
.
width
/
2
,
dy
:
710
+
200
+
40
}
}
},
]);
})
},
setCanvasWH
:
({
bgObj
,
type
,
bgScale
})
=>
{
// 为动态设置画布宽高的方法,
this
.
postertwo
=
bgObj
;
}
});
_app
.
log
(
'
海报生成成功, 时间:
'
+
new
Date
()
+
'
, 临时路径:
'
)
_app
.
log
(
d
.
poster
.
tempFilePath
)
this
.
$set
(
this
.
postertwo
,
'
finalPath
'
,
d
.
poster
.
tempFilePath
)
uni
.
hideLoading
()
//this.saveImagetwo();//自动保存
}
catch
(
e
)
{
uni
.
hideLoading
()
_app
.
hideLoading
();
_app
.
showToast
(
JSON
.
stringify
(
e
));
}
},
saveImagetwo
()
{
// #ifndef H5
uni
.
saveImageToPhotosAlbum
({
filePath
:
this
.
postertwo
.
finalPath
,
success
(
res
)
{
_app
.
showToast
(
'
保存成功
'
);
}
})
// #endif
// #ifdef H5
_app
.
showToast
(
'
保存了
'
);
// #endif
},
sharetwo
()
{
// #ifdef APP-PLUS
_app
.
getShare
(
false
,
false
,
2
,
''
,
''
,
''
,
this
.
postertwo
.
finalPath
,
false
,
false
);
// #endif
// #ifndef APP-PLUS
_app
.
showToast
(
'
分享了
'
);
// #endif
},
},
}
</
script
>
<
style
lang=
"scss"
>
@import
"./myStockRight.scss"
;
</
style
>
static/thighicon.png
0 → 100644
View file @
59783790
5.54 KB
utils/api/api.js
View file @
59783790
...
@@ -562,3 +562,9 @@ export function deleteTable(data)
...
@@ -562,3 +562,9 @@ export function deleteTable(data)
}
}
//获取鹿马股票
export
function
getLmguPiao
(
data
)
{
return
request
.
post
(
"
store/getLmguPiao
"
,
data
,{
noAuth
:
false
});
}
\ No newline at end of file
utils/debug.js
View file @
59783790
...
@@ -4,8 +4,8 @@ module.exports = {
...
@@ -4,8 +4,8 @@ module.exports = {
//是否为开发调试环境 true为本地环境 false 为正式环境
//是否为开发调试环境 true为本地环境 false 为正式环境
//
isdebug:false,//正式
isdebug
:
false
,
//正式
isdebug
:
true
,
//测试
//
isdebug:true,//测试
// xqdebug:false,//正式权限
// xqdebug:false,//正式权限
xqdebug
:
true
,
//发布审核权限 也是测试环境的 主要用于ios
xqdebug
:
true
,
//发布审核权限 也是测试环境的 主要用于ios
...
...
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