Commit 96deb3b4 authored by 黄奎's avatar 黄奎

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

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