Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
96deb3b4
Commit
96deb3b4
authored
Sep 01, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/mallapp
parents
48881382
ecdeea70
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1226 additions
and
825 deletions
+1226
-825
carrierInformation.vue
pages/kotra/carrierInformation.vue
+3
-4
firstShop.vue
pages/kotra/firstShop/firstShop.vue
+860
-585
news.vue
pages/kotra/news.vue
+363
-236
No files found.
pages/kotra/carrierInformation.vue
View file @
96deb3b4
...
...
@@ -669,7 +669,7 @@
/>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
首发政策
</view>
<view
class=
"label-text"
>
首发
、首秀、首展
政策
</view>
<input
type=
"text"
v-model=
"model.StartingInfo"
...
...
@@ -679,7 +679,7 @@
placeholder-style=
"color:#CECECE;"
/>
</view>
<view
class=
"bottom-border"
>
<
!--
<
view
class=
"bottom-border"
>
<view
class=
"label-text"
>
首秀政策
</view>
<input
type=
"text"
...
...
@@ -700,7 +700,7 @@
placeholder=
"请填写首展政策"
placeholder-style=
"color:#CECECE;"
/>
</view>
</view>
-->
<view
style=
"margin-top: 30px"
>
<view
class=
"butBox2"
@
click=
"carrierSubmit"
v-if=
"!disabled"
>
...
...
@@ -1249,7 +1249,6 @@ export default {
this
.
model
.
FirstShopNumList
[
currentIndex
].
Id
=
this
.
shenList
[
index
].
Id
;
this
.
model
.
FirstShopNumList
[
currentIndex
].
Name
=
this
.
shenList
[
index
].
Name
;
console
.
log
(
1138
,
index
,
currentIndex
);
},
addFirstShop
()
{
this
.
model
.
FirstShopNumList
.
push
({
Id
:
0
,
Name
:
""
,
Num
:
0
});
...
...
pages/kotra/firstShop/firstShop.vue
View file @
96deb3b4
<
template
>
<view
class=
"first-shop"
>
<view
style=
"background: #FFFFFF;box-shadow: 0px 10px 50px 0px rgba(218, 220, 230, 0.85);border-radius: 30rpx;padding:30rpx"
>
<view
class=
"label-text"
style=
"margin-top:0;margin-bottom: 30rpx;"
>
<text>
店铺照片
</text>
<text
style=
"color:#999;font-weight: 400;"
>
(上传3-5张照片,第一张为封面图)
</text>
</view>
<view>
<u-upload
v-if=
"isdisabled==false"
:action=
"action"
:max-count=
"5"
:max-size=
"2*1024*1024"
:file-list=
"fileList"
@
on-remove=
"onRemove1"
:custom-btn=
"true"
@
on-success=
"uploadSuccessHandler"
>
<view
slot=
"addBtn"
class=
"slot-btn"
>
<image
class=
"image"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616498310000_18.png"
mode=
"widthFix"
></image>
</view>
</u-upload>
<view
class=
"imglist"
v-else
>
<view
class=
"imglist-item"
v-for=
'(x,i) in model.ImageList'
@
click=
"previewImage(model.ImageList,i)"
>
<image
:src=
"x"
style=
"width: 100%;height: 100%;border-radius: 4px;"
></image>
</view>
</view>
</view>
<view
class=
"label-text"
style=
"margin-top:20px;margin-bottom: 30rpx;"
>
<text>
店铺视频
</text>
</view>
<view
style=
"margin-bottom: 30rpx;"
>
<view
style=
"width: 150px; height: 200px;position: relative;margin-right: 20px;"
v-if=
"model.VideoUrl!=''"
>
<video
id=
"myVideo"
:src=
"model.VideoUrl"
:controls=
'controls'
:show-center-play-btn=
'false'
:show-fullscreen-btn=
'false'
@
fullscreenchange=
'videoControl'
></video>
<view
style=
"width: 100%;height: 100%;position: absolute;left: 0;top: 0;display: flex;align-items: center;justify-content: center;"
@
click=
"enlarge()"
>
<u-icon
name=
"play-circle-o"
:size=
"70"
color=
"#FFF"
></u-icon>
</view>
<view
style=
"width: 50rpx;height: 50rpx;position: absolute;right: 10rpx;top:10rpx;
border-radius: 25rpx;
background: #F30329;
display: flex;
align-items: center;
justify-content: center;
"
@
tap
.
stop=
"model.VideoUrl=''"
v-if=
"isdisabled==false"
>
<u-icon
class=
"u-icon"
name=
"cross"
size=
"30"
color=
"#ffffff"
></u-icon>
</view>
</view>
<view
v-if=
"model.VideoUrl=='' && isdisabled==false"
>
<view
slot=
"addBtn"
class=
"slot-btn"
@
click=
"upvideo()"
>
<image
class=
"image"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1616573063000_398.png"
mode=
"widthFix"
></image>
</view>
</view>
<view
v-if=
"model.VideoUrl=='' && isdisabled==true"
>
无
</view>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
首店名称
</view>
<u-field
v-model=
"model.Name"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写首店名称"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
首店类型
</view>
<u-field
v-model=
"TypeName"
@
click=
"isdisabled==false?showTypeStatus = true:''"
:disabled=
"true"
right-icon=
"arrow"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请选择首店类型"
placeholder-style=
"color:#CECECE;"
></u-field>
<u-action-sheet
@
click=
"clickItem"
name=
'Name'
:list=
"typeList"
v-model=
"showTypeStatus"
></u-action-sheet>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
品牌属地
</text>
<text
style=
"color:#999;font-weight: 400;"
>
(国家或地区)
</text>
</view>
<u-field
v-model=
"BrandTypeName"
@
click=
"isdisabled==false?showTypeStatus2 = true:''"
:disabled=
"true"
right-icon=
"arrow"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请选择品牌属地"
placeholder-style=
"color:#CECECE;"
></u-field>
<u-action-sheet
@
click=
"clickItem2"
name=
'Name'
:list=
"brandTypelist"
v-model=
"showTypeStatus2"
></u-action-sheet>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
首店开业时间
</view>
<u-field
v-model=
"model.OpenTime"
@
click=
"isdisabled==false?showOpenTime=true:''"
:disabled=
"true"
right-icon=
"arrow"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请选择首店开业时间"
placeholder-style=
"color:#CECECE;"
></u-field>
<u-picker
mode=
"time"
v-model=
"showOpenTime"
:params=
"params"
@
confirm=
"confirmOpenTime"
></u-picker>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
首店地址
</view>
<u-field
v-model=
"model.Address"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写首店地址"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
商圈
</view>
<u-field
v-model=
"model.TradingArea"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写首店所属商圈"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
行业
</text>
</view>
<u-field
v-model=
"BusinessName"
@
click=
"isdisabled==false?showTypeStatus3 = true:''"
:disabled=
"true"
right-icon=
"arrow"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请选择品牌属地"
placeholder-style=
"color:#CECECE;"
></u-field>
<u-action-sheet
@
click=
"clickItem3"
name=
'Name'
:list=
"yeTaiList"
v-model=
"showTypeStatus3"
></u-action-sheet>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
首店业种类型
</text>
<text
style=
"color:#999;font-weight: 400;"
>
(如书店,超市,川菜,日料等)
</text>
</view>
<u-field
v-model=
"model.BusinessDetail"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写首店业种类型"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
所属区县
</text>
</view>
<u-field
v-model=
"model.County"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写所属区县"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
首店类别
</text>
</view>
<u-field
v-model=
"CategoryName"
@
click=
"isdisabled==false?showTypeStatus4 = true:'';"
:disabled=
"true"
right-icon=
"arrow"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请选择品牌属地"
placeholder-style=
"color:#CECECE;"
></u-field>
<u-action-sheet
@
click=
"clickItem4"
name=
'Name'
:list=
"shenList"
v-model=
"showTypeStatus4"
></u-action-sheet>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
联系人
</view>
<u-field
v-model=
"model.Contact"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写联系人"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
联系电话
</view>
<u-field
v-model=
"model.ContactMobile"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写联系电话"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
首店简介
</text>
<text
style=
"color:#999;font-weight: 400;"
>
(100字以内)
</text>
</view>
<u-field
v-model=
"model.Description"
:disabled=
"isdisabled"
maxlength=
"100"
type=
"textarea"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"可以填写您的首店简介"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
style=
"margin-top:40rpx"
v-if=
"isdisabled == false"
>
<u-button
shape=
"square"
:ripple=
"true"
@
click=
'tijiao()'
:custom-style=
"
{background:mainColor,border:'none',color:'#FFF'}">提交申请
</u-button>
</view>
<view
style=
"margin-top:40rpx"
v-if=
"isdisabled == true && model.AuditState!=2"
>
<u-button
shape=
"square"
:ripple=
"true"
@
click=
'showdelete=true'
:custom-style=
"
{background:'#F70027',border:'none',color:'#FFF'}">删除
</u-button>
</view>
</view>
<u-modal
v-model=
"showdelete"
content=
"删除该首店认证?"
:show-cancel-button=
'true'
@
cancel=
'showdelete=false'
@
confirm=
'deletebtn()'
></u-modal>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gbAuth'
></auth>
</view>
<view
class=
"first-shop"
>
<view
style=
"
background: #ffffff;
box-shadow: 0px 10px 50px 0px rgba(218, 220, 230, 0.85);
border-radius: 30rpx;
padding: 30rpx;
"
>
<view
class=
"label-text"
style=
"margin-top: 0; margin-bottom: 30rpx"
>
<text>
店铺照片
</text>
<text
style=
"color: #999; font-weight: 400"
>
(上传3-5张照片,第一张为封面图)
</text
>
</view>
<view>
<u-upload
v-if=
"isdisabled == false"
:action=
"action"
:max-count=
"5"
:max-size=
"2 * 1024 * 1024"
:file-list=
"fileList"
@
on-remove=
"onRemove1"
:custom-btn=
"true"
@
on-success=
"uploadSuccessHandler"
>
<view
slot=
"addBtn"
class=
"slot-btn"
>
<image
class=
"image"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616498310000_18.png"
mode=
"widthFix"
></image>
</view>
</u-upload>
<view
class=
"imglist"
v-else
>
<view
class=
"imglist-item"
v-for=
"(x, i) in model.ImageList"
@
click=
"previewImage(model.ImageList, i)"
>
<image
:src=
"x"
style=
"width: 100%; height: 100%; border-radius: 4px"
></image>
</view>
</view>
</view>
<view
class=
"label-text"
style=
"margin-top: 20px; margin-bottom: 30rpx"
>
<text>
店铺视频
</text>
</view>
<view
style=
"margin-bottom: 30rpx"
>
<view
style=
"
width: 150px;
height: 200px;
position: relative;
margin-right: 20px;
"
v-if=
"model.VideoUrl != ''"
>
<video
id=
"myVideo"
:src=
"model.VideoUrl"
:controls=
"controls"
:show-center-play-btn=
"false"
:show-fullscreen-btn=
"false"
@
fullscreenchange=
"videoControl"
></video>
<view
style=
"
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
display: flex;
align-items: center;
justify-content: center;
"
@
click=
"enlarge()"
>
<u-icon
name=
"play-circle-o"
:size=
"70"
color=
"#FFF"
></u-icon>
</view>
<view
style=
"
width: 50rpx;
height: 50rpx;
position: absolute;
right: 10rpx;
top: 10rpx;
border-radius: 25rpx;
background: #f30329;
display: flex;
align-items: center;
justify-content: center;
"
@
tap
.
stop=
"model.VideoUrl = ''"
v-if=
"isdisabled == false"
>
<u-icon
class=
"u-icon"
name=
"cross"
size=
"30"
color=
"#ffffff"
></u-icon>
</view>
</view>
<view
v-if=
"model.VideoUrl == '' && isdisabled == false"
>
<view
slot=
"addBtn"
class=
"slot-btn"
@
click=
"upvideo()"
>
<image
class=
"image"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1616573063000_398.png"
mode=
"widthFix"
></image>
</view>
</view>
<view
v-if=
"model.VideoUrl == '' && isdisabled == true"
>
无
</view>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
首店名称
</view>
<u-field
v-model=
"model.Name"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写首店名称"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
首店类型
</view>
<u-field
v-model=
"TypeName"
@
click=
"isdisabled == false ? (showTypeStatus = true) : ''"
:disabled=
"true"
right-icon=
"arrow"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请选择首店类型"
placeholder-style=
"color:#CECECE;"
></u-field>
<u-action-sheet
@
click=
"clickItem"
name=
"Name"
:list=
"typeList"
v-model=
"showTypeStatus"
></u-action-sheet>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
品牌属地
</text>
<text
style=
"color: #999; font-weight: 400"
>
(国家或地区)
</text>
</view>
<u-field
v-model=
"BrandTypeName"
@
click=
"isdisabled == false ? (showTypeStatus2 = true) : ''"
:disabled=
"true"
right-icon=
"arrow"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请选择品牌属地"
placeholder-style=
"color:#CECECE;"
></u-field>
<u-action-sheet
@
click=
"clickItem2"
name=
"Name"
:list=
"brandTypelist"
v-model=
"showTypeStatus2"
></u-action-sheet>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
首店开业时间
</view>
<u-field
v-model=
"model.OpenTime"
@
click=
"isdisabled == false ? (showOpenTime = true) : ''"
:disabled=
"true"
right-icon=
"arrow"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请选择首店开业时间"
placeholder-style=
"color:#CECECE;"
></u-field>
<u-picker
mode=
"time"
v-model=
"showOpenTime"
:params=
"params"
@
confirm=
"confirmOpenTime"
></u-picker>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
首店地址
</view>
<u-field
v-model=
"model.Address"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写首店地址"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
商圈
</view>
<u-field
v-model=
"model.TradingArea"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写首店所属商圈"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
行业
</text>
</view>
<u-field
v-model=
"BusinessName"
@
click=
"isdisabled == false ? (showTypeStatus3 = true) : ''"
:disabled=
"true"
right-icon=
"arrow"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请选择品牌属地"
placeholder-style=
"color:#CECECE;"
></u-field>
<u-action-sheet
@
click=
"clickItem3"
name=
"Name"
:list=
"yeTaiList"
v-model=
"showTypeStatus3"
></u-action-sheet>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
品牌
</text>
</view>
<u-field
v-model=
"brandName"
@
click=
"isdisabled == false ? (showTypeStatus5 = true) : ''"
:disabled=
"true"
right-icon=
"arrow"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请选择品牌"
placeholder-style=
"color:#CECECE;"
></u-field>
<u-action-sheet
@
click=
"clickItem5"
name=
"BrandName"
:list=
"brandList"
v-model=
"showTypeStatus5"
></u-action-sheet>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
首店业种类型
</text>
<text
style=
"color: #999; font-weight: 400"
>
(如书店,超市,川菜,日料等)
</text
>
</view>
<u-field
v-model=
"model.BusinessDetail"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写首店业种类型"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
所属区县
</text>
</view>
<u-field
v-model=
"model.County"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写所属区县"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
首店类别
</text>
</view>
<u-field
v-model=
"CategoryName"
@
click=
"isdisabled == false ? (showTypeStatus4 = true) : ''"
:disabled=
"true"
right-icon=
"arrow"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请选择品牌属地"
placeholder-style=
"color:#CECECE;"
></u-field>
<u-action-sheet
@
click=
"clickItem4"
name=
"Name"
:list=
"shenList"
v-model=
"showTypeStatus4"
></u-action-sheet>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
联系人
</view>
<u-field
v-model=
"model.Contact"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写联系人"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
联系电话
</view>
<u-field
v-model=
"model.ContactMobile"
:disabled=
"isdisabled"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"请填写联系电话"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
class=
"bottom-border"
>
<view
class=
"label-text"
>
<text>
首店简介
</text>
<text
style=
"color: #999; font-weight: 400"
>
(100字以内)
</text>
</view>
<u-field
v-model=
"model.Description"
:disabled=
"isdisabled"
maxlength=
"100"
type=
"textarea"
padding=
"10px 0px 5px 0"
label-width=
"0"
placeholder=
"可以填写您的首店简介"
placeholder-style=
"color:#CECECE;"
></u-field>
</view>
<view
style=
"margin-top: 40rpx"
v-if=
"isdisabled == false"
>
<u-button
shape=
"square"
:ripple=
"true"
@
click=
"tijiao()"
:custom-style=
"
{
background: mainColor,
border: 'none',
color: '#FFF',
}"
>提交申请
</u-button
>
</view>
<view
style=
"margin-top: 40rpx"
v-if=
"isdisabled == true && model.AuditState != 2"
>
<u-button
shape=
"square"
:ripple=
"true"
@
click=
"showdelete = true"
:custom-style=
"
{
background: '#F70027',
border: 'none',
color: '#FFF',
}"
>删除
</u-button
>
</view>
</view>
<u-modal
v-model=
"showdelete"
content=
"删除该首店认证?"
:show-cancel-button=
"true"
@
cancel=
"showdelete = false"
@
confirm=
"deletebtn()"
></u-modal>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</
template
>
<
script
>
import
auth
from
"../../../components/auth/index.vue"
;
export
default
{
components
:
{
auth
},
data
()
{
return
{
pageTitle
:
'首店申请'
,
params
:
{
year
:
true
,
month
:
true
,
day
:
true
,
hour
:
false
,
minute
:
false
,
second
:
false
},
showAuth
:
false
,
action
:
this
.
host2
+
"/api/File/UploadTencent"
,
fileList
:[],
showdelete
:
false
,
mainColor
:
""
,
TypeName
:
''
,
//类型名称
BrandTypeName
:
''
,
//品牌归属地
BusinessName
:
''
,
//认证行业
CategoryName
:
''
,
//类别
model
:{
Id
:
0
,
VideoUrl
:
''
,
Name
:
""
,
CoverImage
:
''
,
ImageList
:[],
shopType
:
0
,
Type
:
0
,
OpenTime
:
''
,
Address
:
''
,
TradingArea
:
''
,
BusinessType
:
0
,
BusinessDetail
:
''
,
Description
:
''
,
County
:
''
,
Category
:
0
,
Contact
:
''
,
ContactMobile
:
''
,
BrandType
:
''
,
},
typeList
:
[],
brandTypelist
:[],
//品牌归属地
yeTaiList
:
[],
//行业枚举
shenList
:
[],
//
showTypeStatus
:
false
,
showTypeStatus2
:
false
,
showTypeStatus3
:
false
,
showTypeStatus4
:
false
,
showOpenTime
:
false
,
showYeTai
:
false
,
showShenQingType
:
false
,
controls
:
false
,
//显示默认控件
isdisabled
:
false
,
//是否是详情过来的
index
:
0
,
//列表带过来的索引
}
},
onLoad
(
options
)
{
if
(
options
&&
options
.
Id
){
this
.
GetAuthenticationInfo
(
options
.
Id
)
//首店申请详情
this
.
isdisabled
=
true
;
this
.
index
=
options
.
index
uni
.
setNavigationBarTitle
({
title
:
'申请详情'
});
}
else
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
};
this
.
showAuth
=
true
;
}
else
{
this
.
GetAuthenticationTypeEnumList
()
//类型
this
.
GetBrandTypeEnumList
()
//品牌归属地枚举
this
.
GetBusinessTypeEnumList
()
//申请认证行业枚举
this
.
GetAuthenticationCategoryEnumList
()
//认证分类枚举
}
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
}
},
mounted
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
let
MallBaseId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
:
1
;
this
.
action
=
this
.
host2
+
'/api/File/UploadTencent?MallBaseId='
+
MallBaseId
},
methods
:
{
GetAuthenticationInfo
(
id
){
this
.
request2
(
{
url
:
'/api/AppletTrade/GetAuthenticationInfo'
,
data
:
{
AuthenticationId
:
id
}
},
res
=>
{
if
(
res
.
resultCode
==
1
){
this
.
model
=
res
.
data
;
this
.
fileList
=
[]
if
(
this
.
model
.
ImageList
.
length
>
0
){
this
.
model
.
ImageList
.
forEach
(
x
=>
{
let
obj
=
{
url
:
x
}
this
.
fileList
.
push
(
obj
)
})
}
this
.
GetAuthenticationTypeEnumList
()
//类型
this
.
GetBrandTypeEnumList
()
//品牌归属地枚举
this
.
GetBusinessTypeEnumList
()
//申请认证行业枚举
this
.
GetAuthenticationCategoryEnumList
()
//认证分类枚举
}
}
);
},
GetAuthenticationTypeEnumList
(){
this
.
request2
(
{
url
:
'/api/AppletTrade/GetAuthenticationTypeEnumList'
,
data
:
{
Name
:
''
,
Id
:
''
}
},
res
=>
{
if
(
res
.
resultCode
==
1
){
this
.
typeList
=
res
.
data
if
(
this
.
isdisabled
==
true
){
this
.
typeList
.
map
(
x
=>
{
if
(
x
.
Id
==
this
.
model
.
Type
){
this
.
TypeName
=
x
.
Name
return
}
})
}
}
}
);
},
GetBrandTypeEnumList
(){
this
.
request2
(
{
url
:
'/api/AppletTrade/GetBrandTypeEnumList'
,
data
:
{
Name
:
''
,
Id
:
''
}
},
res
=>
{
if
(
res
.
resultCode
==
1
){
this
.
brandTypelist
=
res
.
data
if
(
this
.
isdisabled
==
true
){
this
.
brandTypelist
.
map
(
x
=>
{
if
(
x
.
Id
==
this
.
model
.
BrandType
){
this
.
BrandTypeName
=
x
.
Name
return
}
})
}
}
}
);
},
GetBusinessTypeEnumList
(){
this
.
request2
(
{
url
:
'/api/AppletTrade/GetBusinessTypeEnumList'
,
data
:
{
Name
:
''
,
Id
:
''
}
},
res
=>
{
if
(
res
.
resultCode
==
1
){
this
.
yeTaiList
=
res
.
data
if
(
this
.
isdisabled
==
true
){
this
.
yeTaiList
.
map
(
x
=>
{
if
(
x
.
Id
==
this
.
model
.
BusinessType
){
this
.
BusinessName
=
x
.
Name
return
}
})
}
}
}
);
},
GetAuthenticationCategoryEnumList
(){
this
.
request2
(
{
url
:
'/api/AppletTrade/GetAuthenticationCategoryEnumList'
,
data
:
{
Name
:
''
,
Id
:
''
}
},
res
=>
{
if
(
res
.
resultCode
==
1
){
this
.
shenList
=
res
.
data
if
(
this
.
isdisabled
==
true
){
this
.
shenList
.
map
(
x
=>
{
if
(
x
.
Id
==
this
.
model
.
Category
){
this
.
CategoryName
=
x
.
Name
return
}
})
}
}
}
);
},
tijiao
(){
if
(
this
.
model
.
ImageList
.
length
==
0
){
uni
.
showToast
({
title
:
"请选择图片"
,
icon
:
'none'
});
return
}
this
.
model
.
CoverImage
=
this
.
model
.
ImageList
[
0
]
this
.
request2
(
{
url
:
'/api/AppletTrade/SetAuthenticationInfo'
,
data
:
this
.
model
},
res
=>
{
if
(
res
.
resultCode
==
1
){
uni
.
showToast
({
title
:
'提交成功'
,
icon
:
'none'
});
let
that
=
this
console
.
log
(
res
.
data
)
that
.
showTemplate
(
res
.
data
)
}
}
);
},
//显示模板
showTemplate
(
template
)
{
uni
.
requestSubscribeMessage
({
tmplIds
:
template
,
complete
(
res
){
console
.
log
(
res
)
uni
.
reLaunch
({
url
:
"/pages/kotra/firstShop/list"
,
})
},
})
},
deletebtn
(){
//删除
this
.
request2
(
{
url
:
'/api/AppletTrade/DelAuthenticationInfo'
,
data
:
{
AuthenticationId
:
this
.
model
.
Id
}
},
res
=>
{
if
(
res
.
resultCode
==
1
){
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'none'
});
let
that
=
this
let
pages
=
getCurrentPages
();
// 当前页面
let
beforePage
=
pages
[
pages
.
length
-
2
];
// 前一个页面
setTimeout
(()
=>
{
uni
.
navigateBack
({
success
:
function
()
{
beforePage
.
$vm
.
getsplice
(
that
.
index
);
// 执行前一个页面的created方法
}
});
},
500
)
}
}
);
},
confirmOpenTime
(
r
){
this
.
model
.
OpenTime
=
r
.
year
+
"-"
+
r
.
month
+
"-"
+
r
.
day
},
onRemove1
(
index
)
{
this
.
model
.
ImageList
.
splice
(
index
,
1
);
},
clickItem
(
index
)
{
//类型选择
this
.
TypeName
=
this
.
typeList
[
index
].
Name
;
this
.
model
.
Type
=
this
.
typeList
[
index
].
Id
;
},
clickItem2
(
index
){
//品牌归属地
this
.
BrandTypeName
=
this
.
brandTypelist
[
index
].
Name
;
this
.
model
.
BrandType
=
this
.
brandTypelist
[
index
].
Id
;
},
clickItem3
(
index
){
//行业
this
.
BusinessName
=
this
.
yeTaiList
[
index
].
Name
;
this
.
model
.
BusinessType
=
this
.
yeTaiList
[
index
].
Id
;
},
clickItem4
(
index
){
//类别
this
.
CategoryName
=
this
.
shenList
[
index
].
Name
;
this
.
model
.
Category
=
this
.
shenList
[
index
].
Id
;
},
uploadSuccessHandler
(
data
,
index
,
lists
)
{
let
r
=
JSON
.
parse
(
data
);
console
.
log
(
r
)
this
.
model
.
ImageList
.
push
(
r
.
data
);
},
enlarge
(
file
)
{
// 全屏
this
.
videoContext
=
uni
.
createVideoContext
(
'myVideo'
);
this
.
videoContext
.
requestFullScreen
({
direction
:
0
})
},
videoControl
(
e
){
if
(
e
.
detail
.
fullScreen
==
false
){
this
.
videoContext
.
stop
()
this
.
controls
=
false
}
else
{
this
.
videoContext
.
play
()
this
.
controls
=
true
}
},
upvideo
()
{
let
that
=
this
uni
.
chooseVideo
({
count
:
1
,
sourceType
:
[
'camera'
,
'album'
],
success
:
function
(
res
)
{
console
.
log
(
res
)
that
.
upFile
(
res
.
tempFilePath
,
1
)
uni
.
showLoading
({
title
:
'上传中...'
})
},
fail
(
err
)
{
console
.
log
(
err
,
)
}
});
},
upFile
(
filePath
,
type
)
{
let
MallBaseId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
:
1
;
let
action
=
this
.
host2
+
'/api/File/UploadTencent?MallBaseId='
+
MallBaseId
let
that
=
this
uni
.
uploadFile
({
url
:
action
,
filePath
:
filePath
,
name
:
'file'
,
formData
:
{
user
:
'tesdt'
},
success
:
(
uploadFileRes
)
=>
{
uni
.
hideLoading
()
if
(
uploadFileRes
.
statusCode
==
200
)
{
let
data
=
JSON
.
parse
(
uploadFileRes
.
data
)
that
.
model
.
VideoUrl
=
data
.
data
}
},
fail
:
function
(
res
)
{
console
.
log
(
res
)
wx
.
showToast
({
title
:
'上传失败!'
,
icon
:
'none'
,
duration
:
1000
})
}
});
},
previewImage
(
imgs
,
i
)
{
uni
.
previewImage
({
urls
:
imgs
,
current
:
i
,
longPressActions
:
{
itemList
:
[
"发送给朋友"
,
"保存图片"
,
"收藏"
],
success
:
function
(
data
)
{},
fail
:
function
(
err
)
{
console
.
log
(
err
.
errMsg
);
},
},
});
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
GetAuthenticationTypeEnumList
()
//类型
this
.
GetBrandTypeEnumList
()
//品牌归属地枚举
this
.
GetBusinessTypeEnumList
()
//申请认证行业枚举
this
.
GetAuthenticationCategoryEnumList
()
//认证分类枚举
},
//关闭登录窗口
gbAuth
(){
uni
.
navigateBack
()
},
}
}
import
auth
from
"../../../components/auth/index.vue"
;
export
default
{
components
:
{
auth
,
},
data
()
{
return
{
pageTitle
:
"首店申请"
,
params
:
{
year
:
true
,
month
:
true
,
day
:
true
,
hour
:
false
,
minute
:
false
,
second
:
false
,
},
showAuth
:
false
,
action
:
this
.
host2
+
"/api/File/UploadTencent"
,
fileList
:
[],
showdelete
:
false
,
mainColor
:
""
,
TypeName
:
""
,
//类型名称
BrandTypeName
:
""
,
//品牌归属地
BusinessName
:
""
,
//认证行业
CategoryName
:
""
,
//类别
brandName
:
""
,
//品牌
model
:
{
Id
:
0
,
VideoUrl
:
""
,
Name
:
""
,
CoverImage
:
""
,
ImageList
:
[],
shopType
:
0
,
Type
:
0
,
OpenTime
:
""
,
Address
:
""
,
TradingArea
:
""
,
BusinessType
:
0
,
BusinessDetail
:
""
,
Description
:
""
,
County
:
""
,
Category
:
0
,
Contact
:
""
,
ContactMobile
:
""
,
BrandType
:
""
,
ExistBrandId
:
0
,
//选择品牌
},
typeList
:
[],
brandTypelist
:
[],
//品牌归属地
yeTaiList
:
[],
//行业枚举
shenList
:
[],
//
showTypeStatus
:
false
,
showTypeStatus2
:
false
,
showTypeStatus3
:
false
,
showTypeStatus4
:
false
,
showTypeStatus5
:
false
,
showOpenTime
:
false
,
showYeTai
:
false
,
showShenQingType
:
false
,
controls
:
false
,
//显示默认控件
isdisabled
:
false
,
//是否是详情过来的
index
:
0
,
//列表带过来的索引
brandList
:
[],
//品牌列表
};
},
onLoad
(
options
)
{
if
(
options
&&
options
.
Id
)
{
this
.
GetAuthenticationInfo
(
options
.
Id
);
//首店申请详情
this
.
isdisabled
=
true
;
this
.
index
=
options
.
index
;
uni
.
setNavigationBarTitle
({
title
:
"申请详情"
,
});
}
else
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
{
this
.
GetAuthenticationTypeEnumList
();
//类型
this
.
GetBrandTypeEnumList
();
//品牌归属地枚举
this
.
GetBusinessTypeEnumList
();
//申请认证行业枚举
this
.
GetAuthenticationCategoryEnumList
();
//认证分类枚举
}
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
}
},
mounted
()
{
this
.
getMyBrandList
();
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
let
MallBaseId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
:
1
;
this
.
action
=
this
.
host2
+
"/api/File/UploadTencent?MallBaseId="
+
MallBaseId
;
},
methods
:
{
GetAuthenticationInfo
(
id
)
{
this
.
request2
(
{
url
:
"/api/AppletTrade/GetAuthenticationInfo"
,
data
:
{
AuthenticationId
:
id
},
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
model
=
res
.
data
;
this
.
fileList
=
[];
if
(
this
.
model
.
ImageList
.
length
>
0
)
{
this
.
model
.
ImageList
.
forEach
((
x
)
=>
{
let
obj
=
{
url
:
x
,
};
this
.
fileList
.
push
(
obj
);
});
}
this
.
GetAuthenticationTypeEnumList
();
//类型
this
.
GetBrandTypeEnumList
();
//品牌归属地枚举
this
.
GetBusinessTypeEnumList
();
//申请认证行业枚举
this
.
GetAuthenticationCategoryEnumList
();
//认证分类枚举
}
}
);
},
GetAuthenticationTypeEnumList
()
{
this
.
request2
(
{
url
:
"/api/AppletTrade/GetAuthenticationTypeEnumList"
,
data
:
{
Name
:
""
,
Id
:
""
},
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
typeList
=
res
.
data
;
if
(
this
.
isdisabled
==
true
)
{
this
.
typeList
.
map
((
x
)
=>
{
if
(
x
.
Id
==
this
.
model
.
Type
)
{
this
.
TypeName
=
x
.
Name
;
return
;
}
});
}
}
}
);
},
GetBrandTypeEnumList
()
{
this
.
request2
(
{
url
:
"/api/AppletTrade/GetBrandTypeEnumList"
,
data
:
{
Name
:
""
,
Id
:
""
},
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
brandTypelist
=
res
.
data
;
if
(
this
.
isdisabled
==
true
)
{
this
.
brandTypelist
.
map
((
x
)
=>
{
if
(
x
.
Id
==
this
.
model
.
BrandType
)
{
this
.
BrandTypeName
=
x
.
Name
;
return
;
}
});
}
}
}
);
},
GetBusinessTypeEnumList
()
{
this
.
request2
(
{
url
:
"/api/AppletTrade/GetBusinessTypeEnumList"
,
data
:
{
Name
:
""
,
Id
:
""
},
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
yeTaiList
=
res
.
data
;
if
(
this
.
isdisabled
==
true
)
{
this
.
yeTaiList
.
map
((
x
)
=>
{
if
(
x
.
Id
==
this
.
model
.
BusinessType
)
{
this
.
BusinessName
=
x
.
Name
;
return
;
}
});
}
}
}
);
},
GetAuthenticationCategoryEnumList
()
{
this
.
request2
(
{
url
:
"/api/AppletTrade/GetAuthenticationCategoryEnumList"
,
data
:
{
Name
:
""
,
Id
:
""
},
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
shenList
=
res
.
data
;
if
(
this
.
isdisabled
==
true
)
{
this
.
shenList
.
map
((
x
)
=>
{
if
(
x
.
Id
==
this
.
model
.
Category
)
{
this
.
CategoryName
=
x
.
Name
;
return
;
}
});
}
}
}
);
},
tijiao
()
{
if
(
this
.
model
.
ImageList
.
length
==
0
)
{
uni
.
showToast
({
title
:
"请选择图片"
,
icon
:
"none"
,
});
return
;
}
this
.
model
.
CoverImage
=
this
.
model
.
ImageList
[
0
];
this
.
request2
(
{
url
:
"/api/AppletTrade/SetAuthenticationInfo"
,
data
:
this
.
model
,
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
"提交成功"
,
icon
:
"none"
,
});
let
that
=
this
;
console
.
log
(
res
.
data
);
that
.
showTemplate
(
res
.
data
);
}
}
);
},
//显示模板
showTemplate
(
template
)
{
uni
.
requestSubscribeMessage
({
tmplIds
:
template
,
complete
(
res
)
{
console
.
log
(
res
);
uni
.
reLaunch
({
url
:
"/pages/kotra/firstShop/list"
,
});
},
});
},
deletebtn
()
{
//删除
this
.
request2
(
{
url
:
"/api/AppletTrade/DelAuthenticationInfo"
,
data
:
{
AuthenticationId
:
this
.
model
.
Id
},
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
"删除成功"
,
icon
:
"none"
,
});
let
that
=
this
;
let
pages
=
getCurrentPages
();
// 当前页面
let
beforePage
=
pages
[
pages
.
length
-
2
];
// 前一个页面
setTimeout
(()
=>
{
uni
.
navigateBack
({
success
:
function
()
{
beforePage
.
$vm
.
getsplice
(
that
.
index
);
// 执行前一个页面的created方法
},
});
},
500
);
}
}
);
},
confirmOpenTime
(
r
)
{
this
.
model
.
OpenTime
=
r
.
year
+
"-"
+
r
.
month
+
"-"
+
r
.
day
;
},
onRemove1
(
index
)
{
this
.
model
.
ImageList
.
splice
(
index
,
1
);
},
clickItem
(
index
)
{
//类型选择
this
.
TypeName
=
this
.
typeList
[
index
].
Name
;
this
.
model
.
Type
=
this
.
typeList
[
index
].
Id
;
},
clickItem2
(
index
)
{
//品牌归属地
this
.
BrandTypeName
=
this
.
brandTypelist
[
index
].
Name
;
this
.
model
.
BrandType
=
this
.
brandTypelist
[
index
].
Id
;
},
clickItem3
(
index
)
{
//行业
this
.
BusinessName
=
this
.
yeTaiList
[
index
].
Name
;
this
.
model
.
BusinessType
=
this
.
yeTaiList
[
index
].
Id
;
},
clickItem4
(
index
)
{
//类别
this
.
CategoryName
=
this
.
shenList
[
index
].
Name
;
this
.
model
.
Category
=
this
.
shenList
[
index
].
Id
;
},
clickItem5
(
index
)
{
//品牌
this
.
brandName
=
this
.
brandList
[
index
].
Name
;
this
.
model
.
ExistBrandId
=
this
.
brandList
[
index
].
ID
;
},
uploadSuccessHandler
(
data
,
index
,
lists
)
{
let
r
=
JSON
.
parse
(
data
);
console
.
log
(
r
);
this
.
model
.
ImageList
.
push
(
r
.
data
);
},
enlarge
(
file
)
{
// 全屏
this
.
videoContext
=
uni
.
createVideoContext
(
"myVideo"
);
this
.
videoContext
.
requestFullScreen
({
direction
:
0
,
});
},
videoControl
(
e
)
{
if
(
e
.
detail
.
fullScreen
==
false
)
{
this
.
videoContext
.
stop
();
this
.
controls
=
false
;
}
else
{
this
.
videoContext
.
play
();
this
.
controls
=
true
;
}
},
upvideo
()
{
let
that
=
this
;
uni
.
chooseVideo
({
count
:
1
,
sourceType
:
[
"camera"
,
"album"
],
success
:
function
(
res
)
{
console
.
log
(
res
);
that
.
upFile
(
res
.
tempFilePath
,
1
);
uni
.
showLoading
({
title
:
"上传中..."
,
});
},
fail
(
err
)
{
console
.
log
(
err
);
},
});
},
upFile
(
filePath
,
type
)
{
let
MallBaseId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
:
1
;
let
action
=
this
.
host2
+
"/api/File/UploadTencent?MallBaseId="
+
MallBaseId
;
let
that
=
this
;
uni
.
uploadFile
({
url
:
action
,
filePath
:
filePath
,
name
:
"file"
,
formData
:
{
user
:
"tesdt"
,
},
success
:
(
uploadFileRes
)
=>
{
uni
.
hideLoading
();
if
(
uploadFileRes
.
statusCode
==
200
)
{
let
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
that
.
model
.
VideoUrl
=
data
.
data
;
}
},
fail
:
function
(
res
)
{
console
.
log
(
res
);
wx
.
showToast
({
title
:
"上传失败!"
,
icon
:
"none"
,
duration
:
1000
,
});
},
});
},
previewImage
(
imgs
,
i
)
{
uni
.
previewImage
({
urls
:
imgs
,
current
:
i
,
longPressActions
:
{
itemList
:
[
"发送给朋友"
,
"保存图片"
,
"收藏"
],
success
:
function
(
data
)
{},
fail
:
function
(
err
)
{
console
.
log
(
err
.
errMsg
);
},
},
});
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
GetAuthenticationTypeEnumList
();
//类型
this
.
GetBrandTypeEnumList
();
//品牌归属地枚举
this
.
GetBusinessTypeEnumList
();
//申请认证行业枚举
this
.
GetAuthenticationCategoryEnumList
();
//认证分类枚举
},
//关闭登录窗口
gbAuth
()
{
uni
.
navigateBack
();
},
getMyBrandList
()
{
this
.
request2
(
{
url
:
"/api/applettrade/GetMyBrandList"
,
data
:
{},
},
(
res
)
=>
{
console
.
log
(
806
,
res
);
if
(
res
.
resultCode
==
1
)
{
this
.
brandList
=
res
.
data
;
}
}
);
},
},
};
</
script
>
<
style
>
.first-shop
{
background
:
#f6f6f6
;
padding
:
30
rpx
;
min-height
:
100vh
;
font-family
:
pingfang
;}
.first-shop
.label-text
{
font-size
:
28
rpx
;
color
:
#1F1F1F
;
font-weight
:
600
;
margin-top
:
40
rpx
;
}
.first-shop
.slot-btn
{
width
:
220
rpx
;
height
:
220
rpx
;
background
:
#F5F5F5
;
border-radius
:
17
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.first-shop
.slot-btn
.image
{
width
:
54
rpx
;
height
:
auto
;
}
.first-shop
.bottom-border
{
border-bottom
:
3
rpx
#DADCE6
solid
;
}
#myVideo
{
width
:
150px
;
height
:
200px
;
}
.imglist
{
width
:
100%
;
display
:
flex
;
flex-wrap
:
wrap
;
}
.imglist-item
{
width
:
180
rpx
;
height
:
180
rpx
;
border-radius
:
4px
;
margin-left
:
15px
;
margin-bottom
:
10px
;
}
.first-shop
{
background
:
#f6f6f6
;
padding
:
30
rpx
;
min-height
:
100vh
;
font-family
:
pingfang
;
}
.first-shop
.label-text
{
font-size
:
28
rpx
;
color
:
#1f1f1f
;
font-weight
:
600
;
margin-top
:
40
rpx
;
}
.first-shop
.slot-btn
{
width
:
220
rpx
;
height
:
220
rpx
;
background
:
#f5f5f5
;
border-radius
:
17
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.first-shop
.slot-btn
.image
{
width
:
54
rpx
;
height
:
auto
;
}
.first-shop
.bottom-border
{
border-bottom
:
3
rpx
#dadce6
solid
;
}
#myVideo
{
width
:
150px
;
height
:
200px
;
}
.imglist
{
width
:
100%
;
display
:
flex
;
flex-wrap
:
wrap
;
}
.imglist-item
{
width
:
180
rpx
;
height
:
180
rpx
;
border-radius
:
4px
;
margin-left
:
15px
;
margin-bottom
:
10px
;
}
</
style
>
pages/kotra/news.vue
View file @
96deb3b4
<
style
>
.koraNews
{
width
:
100%
;
height
:
100vh
;
background
:
#F6F6F6
;
overflow
:
hidden
;
}
.koraNewsList
{
width
:
100%
;
padding
:
0
15px
;
margin-top
:
20px
;
}
.koraNews-time
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
12px
;
color
:
#B9BCCA
;
font-family
:
aa
;
}
.koraNews-box
{
width
:
100%
;
border-radius
:
6px
;
background
:
#FFF
;
overflow
:
hidden
;
margin-top
:
10px
;
}
.newsimgs
{
width
:
100%
;
border-top-left-radius
:
6px
;
border-top-right-radius
:
6px
;
height
:
145px
;
}
.n-img
{
width
:
100%
;
height
:
100%
;
border-top-left-radius
:
6px
;
border-top-right-radius
:
6px
;
}
.box-conet
{
width
:
100%
;
padding
:
10px
15px
;
}
.koraRName
{
color
:
#111111
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
overflow
:
hidden
;
font-size
:
28
rpx
;
line-height
:
30
rpx
;
font-weight
:
600
;
}
.koraRName-f
{
font-size
:
12px
;
color
:
#999999
;
margin-top
:
5px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.koraNewsSearch
{
padding
:
0px
10px
10px
;
.koraNews
{
width
:
100%
;
height
:
100vh
;
background
:
#f6f6f6
;
overflow
:
hidden
;
}
.koraNewsList
{
width
:
100%
;
padding
:
0
15px
;
margin-top
:
20px
;
}
.koraNews-time
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
12px
;
color
:
#b9bcca
;
font-family
:
aa
;
}
.koraNews-box
{
width
:
100%
;
border-radius
:
6px
;
background
:
#fff
;
overflow
:
hidden
;
margin-top
:
10px
;
}
.newsimgs
{
width
:
100%
;
border-top-left-radius
:
6px
;
border-top-right-radius
:
6px
;
height
:
145px
;
}
.n-img
{
width
:
100%
;
height
:
100%
;
border-top-left-radius
:
6px
;
border-top-right-radius
:
6px
;
}
.box-conet
{
width
:
100%
;
padding
:
10px
15px
;
}
.koraRName
{
color
:
#111111
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
overflow
:
hidden
;
font-size
:
28
rpx
;
line-height
:
30
rpx
;
font-weight
:
600
;
}
.koraRName-f
{
font-size
:
12px
;
color
:
#999999
;
margin-top
:
5px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.koraNewsSearch
{
padding
:
0px
10px
10px
;
}
</
style
>
<
template
>
<view
class=
"koraNews"
>
<view
class=
"koraNewsSearch"
>
<u-search
action-text=
"搜索"
:clearabled=
"true"
style=
"width:95%"
:show-action=
"false"
radius=
"40"
v-model=
"msg.Title"
@
search=
"getList(1)"
@
custom=
"getList(1)"
></u-search>
</view>
<view
style=
"display: flex;align-items: center;margin-bottom: 30rpx;padding: 0px 15px;"
>
<image
@
click=
"goNewFirstShop"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616490607000_36.png"
style=
"flex:1;width:1px;margin-right: 15rpx;"
mode=
"widthFix"
></image>
<image
@
click=
"goMyFirstShop"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616490607000_108.png"
style=
"flex:1;width:1px;margin-left: 15rpx;"
mode=
"widthFix"
></image>
</view>
<u-empty
v-if=
"dataList.length==0"
text=
"暂无数据"
mode=
"data"
></u-empty>
<scroll-view
v-else
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
style=
"height: calc(100vh - 189px);"
>
<view
style=
"font-size: 30rpx;font-weight: 700;color: #111;padding: 0 15px;"
>
资讯信息
</view>
<view>
<view
class=
"koraNewsList"
v-for=
"(item,index) in dataList"
:key=
"index"
@
click=
"goNewsDetail(item)"
>
<view
class=
"koraNews-time"
>
{{
item
.
CreateDate
?
item
.
CreateDate
.
replace
(
'T'
,
' '
):
''
}}
</view>
<view
class=
"koraNews-box"
>
<view
class=
"newsimgs"
style=
"position: relative;"
>
<image
:src=
"item.CoverImg"
mode=
"aspectFill"
class=
'n-img'
/>
<view
style=
"top:10px;left:10px;position: absolute;"
v-if=
"item.Industry&&item.Industry.length>0"
>
<u-tag
:text=
"item.Industry"
mode=
"dark"
bg-color=
"rgba(0,0,0,.4)"
color=
"#FFF"
size=
"mini"
></u-tag>
</view>
</view>
<view
class=
"box-conet"
>
<view
class=
"koraRName"
>
{{
item
.
Title
}}
</view>
<view
class=
"koraRName-f"
>
{{
item
.
Subtitle
}}
</view>
</view>
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#F6F6F6"
/>
</scroll-view>
<tabbars></tabbars>
</view>
<view
class=
"koraNews"
>
<view
class=
"koraNewsSearch"
>
<u-search
action-text=
"搜索"
:clearabled=
"true"
style=
"width: 95%"
:show-action=
"false"
radius=
"40"
v-model=
"msg.Title"
@
search=
"getList(1)"
@
custom=
"getList(1)"
></u-search>
</view>
<view
style=
"
display: flex;
align-items: center;
margin-bottom: 30rpx;
padding: 0px 15px;
"
>
<image
@
click=
"goNewFirstShop"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616490607000_36.png"
style=
"flex: 1; width: 1px; margin-right: 15rpx"
mode=
"widthFix"
></image>
<image
@
click=
"goMyFirstShop"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616490607000_108.png"
style=
"flex: 1; width: 1px; margin-left: 15rpx"
mode=
"widthFix"
></image>
</view>
<u-empty
v-if=
"dataList.length == 0"
text=
"暂无数据"
mode=
"data"
></u-empty>
<scroll-view
v-else
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
style=
"height: calc(100vh - 189px)"
>
<view
style=
"font-size: 30rpx; font-weight: 700; color: #111; padding: 0 15px"
>
资讯信息
</view
>
<view>
<view
class=
"koraNewsList"
v-for=
"(item, index) in dataList"
:key=
"index"
@
click=
"goNewsDetail(item)"
>
<view
class=
"koraNews-time"
>
{{
item
.
CreateDate
?
item
.
CreateDate
.
replace
(
"T"
,
" "
)
:
""
}}
</view>
<view
class=
"koraNews-box"
>
<view
class=
"newsimgs"
style=
"position: relative"
>
<image
:src=
"item.CoverImg"
mode=
"aspectFill"
class=
"n-img"
/>
<view
style=
"top: 10px; left: 10px; position: absolute"
v-if=
"item.Industry && item.Industry.length > 0"
>
<u-tag
:text=
"item.Industry"
mode=
"dark"
bg-color=
"rgba(0,0,0,.4)"
color=
"#FFF"
size=
"mini"
></u-tag>
</view>
</view>
<view
class=
"box-conet"
>
<view
class=
"koraRName"
>
{{
item
.
Title
}}
</view>
<view
class=
"koraRName-f"
>
{{
item
.
Subtitle
}}
</view>
</view>
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#F6F6F6"
/>
</scroll-view>
<tabbars></tabbars>
</view>
</
template
>
<
script
>
import
tabbars
from
'@/components/tabbar/index'
;
export
default
{
components
:{
tabbars
},
data
()
{
return
{
pageTitle
:
"首店经济"
,
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
Title
:
''
,
// Type:1
},
pageCount
:
1
,
dataList
:[],
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
""
,
},
status
:
''
,
}
},
onShareTimeline
()
{
//朋友圈
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
if
(
uid
==
0
)
{
uid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
}
let
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
if
(
SmallShopId
==
0
)
{
//如果微店id为0 去找所属微店id
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
return
{
title
:
'首店经济'
,
query
:
"user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
Up
,
imageUrl
:
""
,
};
},
onShareAppMessage
(
res
)
{
//朋友
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
if
(
uid
==
0
)
{
uid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
}
let
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
if
(
SmallShopId
==
0
)
{
//如果微店id为0 去找所属微店id
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
return
{
title
:
'首店经济'
,
path
:
"/pages/kotra/news?user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
Up
,
imageUrl
:
""
,
};
},
mounted
(){
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
this
.
getList
(
1
);
},
methods
:
{
//获取数据
getList
(
num
)
{
if
(
num
==
1
)
{
this
.
dataList
=
[];
}
uni
.
showLoading
({
title
:
'加载中'
});
this
.
request2
({
url
:
"/api/AppletTrade/GetNewsPage"
,
data
:
this
.
msg
,
},
(
res
)
=>
{
uni
.
hideLoading
();
if
(
res
.
resultCode
==
1
)
{
this
.
dataList
=
this
.
dataList
.
concat
(
res
.
data
.
pageData
);
this
.
pageCount
=
res
.
data
.
pageCount
;
}
}
);
},
//滚动加载
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
pageCount
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
getList
();
}
else
{
this
.
status
=
"nomore"
;
}
},
//跳转至新闻详情
goNewsDetail
(
item
){
uni
.
navigateTo
({
url
:
'/pages/kotra/newsInDetail?Id='
+
item
.
Id
});
},
goNewFirstShop
(){
uni
.
navigateTo
({
url
:
'/pages/kotra/firstShop/firstShop'
});
},
goMyFirstShop
(){
uni
.
navigateTo
({
url
:
'/pages/kotra/firstShop/list'
});
},
}
}
import
tabbars
from
"@/components/tabbar/index"
;
export
default
{
components
:
{
tabbars
,
},
data
()
{
return
{
pageTitle
:
"首店经济"
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
Title
:
""
,
// Type:1
},
pageCount
:
1
,
dataList
:
[],
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
""
,
},
status
:
""
,
CommpanyStatus
:
0
,
//公司认证状态
FirstShopType
:
1
,
//1:品牌,2:载体
};
},
onShareTimeline
()
{
//朋友圈
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
if
(
uid
==
0
)
{
uid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
}
let
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
if
(
SmallShopId
==
0
)
{
//如果微店id为0 去找所属微店id
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
return
{
title
:
"首店经济"
,
query
:
"user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
Up
,
imageUrl
:
""
,
};
},
onShareAppMessage
(
res
)
{
//朋友
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
if
(
uid
==
0
)
{
uid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
}
let
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
if
(
SmallShopId
==
0
)
{
//如果微店id为0 去找所属微店id
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
return
{
title
:
"首店经济"
,
path
:
"/pages/kotra/news?user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
Up
,
imageUrl
:
""
,
};
},
mounted
()
{
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
this
.
getList
(
1
);
this
.
getCommpanyStatus
();
},
methods
:
{
//获取数据
getList
(
num
)
{
if
(
num
==
1
)
{
this
.
dataList
=
[];
}
uni
.
showLoading
({
title
:
"加载中"
,
});
this
.
request2
(
{
url
:
"/api/AppletTrade/GetNewsPage"
,
data
:
this
.
msg
,
},
(
res
)
=>
{
uni
.
hideLoading
();
if
(
res
.
resultCode
==
1
)
{
this
.
dataList
=
this
.
dataList
.
concat
(
res
.
data
.
pageData
);
this
.
pageCount
=
res
.
data
.
pageCount
;
}
}
);
},
//滚动加载
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
pageCount
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
getList
();
}
else
{
this
.
status
=
"nomore"
;
}
},
//跳转至新闻详情
goNewsDetail
(
item
)
{
uni
.
navigateTo
({
url
:
"/pages/kotra/newsInDetail?Id="
+
item
.
Id
,
});
},
goNewFirstShop
()
{
this
.
auth
(
"/pages/kotra/firstShop/firstShop"
);
// uni.navigateTo({
// url: "/pages/kotra/firstShop/firstShop",
// });
},
goMyFirstShop
()
{
this
.
auth
(
"/pages/kotra/firstShop/list"
);
// uni.navigateTo({
// url: "/pages/kotra/firstShop/list",
// });
},
auth
(
url
)
{
if
(
this
.
CommpanyStatus
===
1
||
this
.
CommpanyStatus
===
4
)
{
uni
.
showModal
({
title
:
"提示"
,
content
:
"请您先完成实名认证"
,
// showCancel: false,
confirmText
:
"立即认证"
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
uni
.
navigateTo
({
url
:
"/pages/kotra/identification"
,
});
}
else
if
(
res
.
cancel
)
{
}
},
});
}
else
if
(
this
.
CommpanyStatus
===
3
)
{
uni
.
showModal
({
title
:
"提示"
,
content
:
"感谢您的厚爱,请等待认证通过以后再来尝试吧"
,
showCancel
:
false
,
confirmText
:
"我知道了"
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
}
},
});
}
else
if
(
this
.
CommpanyStatus
===
2
)
{
uni
.
showModal
({
title
:
"提示"
,
content
:
"认证待完善"
,
// showCancel: false,
confirmText
:
"立即完善"
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
uni
.
navigateTo
({
url
:
"/pages/kotra/identification"
,
});
}
else
if
(
res
.
cancel
)
{
}
},
});
}
else
if
(
this
.
CommpanyStatus
===
5
&&
this
.
FirstShopType
===
1
)
{
uni
.
navigateTo
({
url
:
url
,
});
}
},
getCommpanyStatus
()
{
this
.
request2
(
{
url
:
"/api/AppletTrade/GetCommpanyStatus"
,
data
:
{},
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
CommpanyStatus
=
res
.
data
.
CompanyStatus
;
this
.
FirstShopType
=
res
.
data
.
FirstShopType
;
}
}
);
},
},
};
</
script
>
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