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="
<text>店铺照片</text> background: #ffffff;
<text style="color:#999;font-weight: 400;">(上传3-5张照片,第一张为封面图)</text> box-shadow: 0px 10px 50px 0px rgba(218, 220, 230, 0.85);
</view> border-radius: 30rpx;
<view> padding: 30rpx;
<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 class="label-text" style="margin-top: 0; margin-bottom: 30rpx">
</view> <text>店铺照片</text>
</u-upload> <text style="color: #999; font-weight: 400"
<view class="imglist" v-else > >(上传3-5张照片,第一张为封面图)</text
<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> <u-upload
</view> v-if="isdisabled == false"
<view class="label-text" style="margin-top:20px;margin-bottom: 30rpx;"> :action="action"
<text>店铺视频</text> :max-count="5"
</view> :max-size="2 * 1024 * 1024"
<view style="margin-bottom: 30rpx;"> :file-list="fileList"
<view style="width: 150px; height: 200px;position: relative;margin-right: 20px;" v-if="model.VideoUrl!=''"> @on-remove="onRemove1"
<video id="myVideo" :src="model.VideoUrl" :custom-btn="true"
:controls='controls' @on-success="uploadSuccessHandler"
:show-center-play-btn='false' >
:show-fullscreen-btn='false' <view slot="addBtn" class="slot-btn">
@fullscreenchange='videoControl' ></video> <image
class="image"
<view style="width: 100%;height: 100%;position: absolute;left: 0;top: 0;display: flex;align-items: center;justify-content: center;" @click="enlarge()"> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616498310000_18.png"
<u-icon name="play-circle-o" :size="70" color="#FFF"></u-icon> mode="widthFix"
</view> ></image>
<view style="width: 50rpx;height: 50rpx;position: absolute;right: 10rpx;top:10rpx; </view>
border-radius: 25rpx; </u-upload>
background: #F30329; <view class="imglist" v-else>
display: flex; <view
align-items: center; class="imglist-item"
justify-content: center; v-for="(x, i) in model.ImageList"
" @tap.stop="model.VideoUrl=''" @click="previewImage(model.ImageList, i)"
v-if="isdisabled==false" >
> <image
:src="x"
<u-icon class="u-icon" name="cross" size="30" color="#ffffff"></u-icon> style="width: 100%; height: 100%; border-radius: 4px"
</view> ></image>
</view> </view>
<view v-if="model.VideoUrl=='' && isdisabled==false"> </view>
<view slot="addBtn" class="slot-btn" @click="upvideo()"> </view>
<image class="image" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1616573063000_398.png" mode="widthFix"></image> <view class="label-text" style="margin-top: 20px; margin-bottom: 30rpx">
<text>店铺视频</text>
</view> </view>
</view> <view style="margin-bottom: 30rpx">
<view v-if="model.VideoUrl=='' && isdisabled==true"> <view
style="
</view> width: 150px;
</view> height: 200px;
<view class="bottom-border"> position: relative;
<view class="label-text">首店名称</view> margin-right: 20px;
<u-field v-model="model.Name" :disabled="isdisabled" padding="10px 0px 5px 0" label-width="0" placeholder="请填写首店名称" placeholder-style="color:#CECECE;"></u-field> "
</view> v-if="model.VideoUrl != ''"
<view class="bottom-border"> >
<view class="label-text">首店类型</view> <video
<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> id="myVideo"
<u-action-sheet @click="clickItem" name='Name' :list="typeList" v-model="showTypeStatus"></u-action-sheet> :src="model.VideoUrl"
</view> :controls="controls"
<view class="bottom-border"> :show-center-play-btn="false"
<view class="label-text"> :show-fullscreen-btn="false"
<text>品牌属地</text> @fullscreenchange="videoControl"
<text style="color:#999;font-weight: 400;">(国家或地区)</text> ></video>
</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> <view
<u-action-sheet @click="clickItem2" name='Name' :list="brandTypelist" v-model="showTypeStatus2"></u-action-sheet> style="
</view> width: 100%;
<view class="bottom-border"> height: 100%;
<view class="label-text">首店开业时间</view> position: absolute;
<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> left: 0;
<u-picker mode="time" v-model="showOpenTime" :params="params" @confirm="confirmOpenTime"></u-picker> top: 0;
</view> display: flex;
<view class="bottom-border"> align-items: center;
<view class="label-text">首店地址</view> justify-content: center;
<u-field v-model="model.Address" :disabled="isdisabled" padding="10px 0px 5px 0" label-width="0" placeholder="请填写首店地址" placeholder-style="color:#CECECE;"></u-field> "
</view> @click="enlarge()"
<view class="bottom-border"> >
<view class="label-text">商圈</view> <u-icon name="play-circle-o" :size="70" color="#FFF"></u-icon>
<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
<view class="bottom-border"> style="
<view class="label-text"> width: 50rpx;
<text>行业</text> height: 50rpx;
</view> position: absolute;
<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> right: 10rpx;
<u-action-sheet @click="clickItem3" name='Name' :list="yeTaiList" v-model="showTypeStatus3"></u-action-sheet> top: 10rpx;
</view> border-radius: 25rpx;
<view class="bottom-border"> background: #f30329;
<view class="label-text"> display: flex;
<text>首店业种类型</text> align-items: center;
<text style="color:#999;font-weight: 400;">(如书店,超市,川菜,日料等)</text> justify-content: center;
</view> "
<u-field v-model="model.BusinessDetail" :disabled="isdisabled" padding="10px 0px 5px 0" label-width="0" placeholder="请填写首店业种类型" placeholder-style="color:#CECECE;"></u-field> @tap.stop="model.VideoUrl = ''"
</view> v-if="isdisabled == false"
<view class="bottom-border"> >
<view class="label-text"> <u-icon
<text>所属区县</text> class="u-icon"
name="cross"
</view> size="30"
<u-field v-model="model.County" :disabled="isdisabled" padding="10px 0px 5px 0" label-width="0" placeholder="请填写所属区县" placeholder-style="color:#CECECE;"></u-field> color="#ffffff"
</view> ></u-icon>
<view class="bottom-border"> </view>
<view class="label-text"> </view>
<text>首店类别</text> <view v-if="model.VideoUrl == '' && isdisabled == false">
</view> <view slot="addBtn" class="slot-btn" @click="upvideo()">
<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> <image
<u-action-sheet @click="clickItem4" name='Name' :list="shenList" v-model="showTypeStatus4"></u-action-sheet> class="image"
</view> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1616573063000_398.png"
<view class="bottom-border"> mode="widthFix"
<view class="label-text">联系人</view> ></image>
<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>
<view class="bottom-border"> <view v-if="model.VideoUrl == '' && isdisabled == true"></view>
<view class="label-text">联系电话</view> </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 class="bottom-border">
</view> <view class="label-text">首店名称</view>
<view class="bottom-border"> <u-field
<view class="label-text"> v-model="model.Name"
<text>首店简介</text> :disabled="isdisabled"
<text style="color:#999;font-weight: 400;">(100字以内)</text> padding="10px 0px 5px 0"
</view> label-width="0"
<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> placeholder="请填写首店名称"
</view> placeholder-style="color:#CECECE;"
<view style="margin-top:40rpx" v-if="isdisabled == false"> ></u-field>
<u-button shape="square" :ripple="true" @click='tijiao()' :custom-style="{background:mainColor,border:'none',color:'#FFF'}">提交申请</u-button> </view>
</view> <view class="bottom-border">
<view style="margin-top:40rpx" v-if="isdisabled == true && model.AuditState!=2"> <view class="label-text">首店类型</view>
<u-button shape="square" :ripple="true" @click='showdelete=true' :custom-style="{background:'#F70027',border:'none',color:'#FFF'}">删除</u-button> <u-field
</view> v-model="TypeName"
</view> @click="isdisabled == false ? (showTypeStatus = true) : ''"
:disabled="true"
<u-modal v-model="showdelete" content="删除该首店认证?" :show-cancel-button='true' @cancel='showdelete=false' @confirm='deletebtn()'></u-modal> right-icon="arrow"
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth> padding="10px 0px 5px 0"
</view> 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> </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: "",
typeList: [], ExistBrandId: 0, //选择品牌
brandTypelist:[],//品牌归属地 },
yeTaiList: [],//行业枚举 typeList: [],
shenList: [],// brandTypelist: [], //品牌归属地
showTypeStatus:false, yeTaiList: [], //行业枚举
showTypeStatus2:false, shenList: [], //
showTypeStatus3:false, showTypeStatus: false,
showTypeStatus4:false, showTypeStatus2: false,
showOpenTime:false, showTypeStatus3: false,
showYeTai:false, showTypeStatus4: false,
showShenQingType:false, showTypeStatus5: false,
controls:false,//显示默认控件 showOpenTime: false,
isdisabled :false,//是否是详情过来的 showYeTai: false,
index:0,//列表带过来的索引 showShenQingType: false,
} controls: false, //显示默认控件
}, isdisabled: false, //是否是详情过来的
onLoad(options) { index: 0, //列表带过来的索引
if(options && options.Id){ brandList: [], //品牌列表
this.GetAuthenticationInfo(options.Id)//首店申请详情 };
this.isdisabled=true; },
this.index = options.index onLoad(options) {
uni.setNavigationBarTitle({ if (options && options.Id) {
title: '申请详情' this.GetAuthenticationInfo(options.Id); //首店申请详情
}); this.isdisabled = true;
}else{ this.index = options.index;
this.u = uni.getStorageSync("mall_UserInfo"); uni.setNavigationBarTitle({
if (!this.u) { title: "申请详情",
this.u = { });
nickName: "未登录", } else {
avatarUrl: "" this.u = uni.getStorageSync("mall_UserInfo");
}; if (!this.u) {
this.showAuth = true; this.u = {
}else{ nickName: "未登录",
this.GetAuthenticationTypeEnumList()//类型 avatarUrl: "",
this.GetBrandTypeEnumList()//品牌归属地枚举 };
this.GetBusinessTypeEnumList()//申请认证行业枚举 this.showAuth = true;
this.GetAuthenticationCategoryEnumList()//认证分类枚举 } else {
this.GetAuthenticationTypeEnumList(); //类型
} this.GetBrandTypeEnumList(); //品牌归属地枚举
let currentPages = getCurrentPages(); this.GetBusinessTypeEnumList(); //申请认证行业枚举
let u = "/" + currentPages[currentPages.length - 1].route; this.GetAuthenticationCategoryEnumList(); //认证分类枚举
let pages = wx.getStorageSync("basedata") }
? wx.getStorageSync("basedata").bar_title let currentPages = getCurrentPages();
: []; let u = "/" + currentPages[currentPages.length - 1].route;
pages.forEach((x) => { let pages = wx.getStorageSync("basedata")
if (x.value == u) { ? wx.getStorageSync("basedata").bar_title
this.pageTitle = x.new_name ? x.new_name : x.name; : [];
} pages.forEach((x) => {
}); if (x.value == u) {
uni.setNavigationBarTitle({ this.pageTitle = x.new_name ? x.new_name : x.name;
title: this.pageTitle, }
}); });
} uni.setNavigationBarTitle({
}, title: this.pageTitle,
mounted() { });
}
this.mainColor = this.$uiConfig.mainColor; },
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ? uni.getStorageSync("mall_UserInfo").MallBaseId : 1; mounted() {
this.action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId this.getMyBrandList();
}, this.mainColor = this.$uiConfig.mainColor;
methods: { let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId
GetAuthenticationInfo(id){ ? uni.getStorageSync("mall_UserInfo").MallBaseId
this.request2( : 1;
{ this.action =
url: '/api/AppletTrade/GetAuthenticationInfo', this.host2 + "/api/File/UploadTencent?MallBaseId=" + MallBaseId;
data: {AuthenticationId:id} },
}, methods: {
res => { GetAuthenticationInfo(id) {
if(res.resultCode==1){ this.request2(
this.model = res.data; {
this.fileList = [] url: "/api/AppletTrade/GetAuthenticationInfo",
if(this.model.ImageList.length>0){ data: { AuthenticationId: id },
this.model.ImageList.forEach(x=>{ },
let obj ={ (res) => {
url:x if (res.resultCode == 1) {
} this.model = res.data;
this.fileList.push(obj) this.fileList = [];
}) if (this.model.ImageList.length > 0) {
} this.model.ImageList.forEach((x) => {
this.GetAuthenticationTypeEnumList()//类型 let obj = {
this.GetBrandTypeEnumList()//品牌归属地枚举 url: x,
this.GetBusinessTypeEnumList()//申请认证行业枚举 };
this.GetAuthenticationCategoryEnumList()//认证分类枚举 this.fileList.push(obj);
} });
} }
); this.GetAuthenticationTypeEnumList(); //类型
}, this.GetBrandTypeEnumList(); //品牌归属地枚举
GetAuthenticationTypeEnumList(){ this.GetBusinessTypeEnumList(); //申请认证行业枚举
this.request2( this.GetAuthenticationCategoryEnumList(); //认证分类枚举
{ }
url: '/api/AppletTrade/GetAuthenticationTypeEnumList', }
data: {Name:'',Id:''} );
}, },
res => { GetAuthenticationTypeEnumList() {
if(res.resultCode==1){ this.request2(
this.typeList = res.data {
if(this.isdisabled == true){ url: "/api/AppletTrade/GetAuthenticationTypeEnumList",
this.typeList.map(x=>{ data: { Name: "", Id: "" },
if(x.Id==this.model.Type){ },
this.TypeName = x.Name (res) => {
return 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 => { GetBrandTypeEnumList() {
if(res.resultCode==1){ this.request2(
this.brandTypelist = res.data {
if(this.isdisabled == true){ url: "/api/AppletTrade/GetBrandTypeEnumList",
this.brandTypelist.map(x=>{ data: { Name: "", Id: "" },
if(x.Id==this.model.BrandType){ },
this.BrandTypeName = x.Name (res) => {
return 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 => { GetBusinessTypeEnumList() {
if(res.resultCode==1){ this.request2(
this.yeTaiList = res.data {
if(this.isdisabled == true){ url: "/api/AppletTrade/GetBusinessTypeEnumList",
this.yeTaiList.map(x=>{ data: { Name: "", Id: "" },
if(x.Id==this.model.BusinessType){ },
this.BusinessName = x.Name (res) => {
return 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 => { GetAuthenticationCategoryEnumList() {
if(res.resultCode==1){ this.request2(
this.shenList = res.data {
if(this.isdisabled == true){ url: "/api/AppletTrade/GetAuthenticationCategoryEnumList",
this.shenList.map(x=>{ data: { Name: "", Id: "" },
if(x.Id==this.model.Category){ },
this.CategoryName = x.Name (res) => {
return 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 tijiao() {
} if (this.model.ImageList.length == 0) {
this.model.CoverImage = this.model.ImageList[0] uni.showToast({
title: "请选择图片",
this.request2( icon: "none",
{ });
url: '/api/AppletTrade/SetAuthenticationInfo', return;
data: this.model }
}, this.model.CoverImage = this.model.ImageList[0];
res => {
if(res.resultCode==1){ this.request2(
uni.showToast({ {
title: '提交成功', url: "/api/AppletTrade/SetAuthenticationInfo",
icon:'none' data: this.model,
}); },
let that = this (res) => {
console.log(res.data) if (res.resultCode == 1) {
that.showTemplate(res.data) uni.showToast({
title: "提交成功",
icon: "none",
});
} let that = this;
} console.log(res.data);
); that.showTemplate(res.data);
}, }
//显示模板 }
showTemplate(template) { );
uni.requestSubscribeMessage({ },
tmplIds: template, //显示模板
complete(res){ showTemplate(template) {
console.log(res) uni.requestSubscribeMessage({
uni.reLaunch({ tmplIds: template,
url: "/pages/kotra/firstShop/list", complete(res) {
}) console.log(res);
}, uni.reLaunch({
url: "/pages/kotra/firstShop/list",
}) });
}, },
deletebtn(){//删除 });
this.request2( },
{ deletebtn() {
url: '/api/AppletTrade/DelAuthenticationInfo', //删除
data: {AuthenticationId:this.model.Id} this.request2(
}, {
res => { url: "/api/AppletTrade/DelAuthenticationInfo",
if(res.resultCode==1){ data: { AuthenticationId: this.model.Id },
uni.showToast({ },
title: '删除成功', (res) => {
icon:'none' if (res.resultCode == 1) {
}); uni.showToast({
let that = this title: "删除成功",
let pages = getCurrentPages(); // 当前页面 icon: "none",
let beforePage = pages[pages.length - 2]; // 前一个页面 });
setTimeout(() => { let that = this;
uni.navigateBack({ let pages = getCurrentPages(); // 当前页面
success: function() { let beforePage = pages[pages.length - 2]; // 前一个页面
beforePage.$vm.getsplice(that.index); // 执行前一个页面的created方法 setTimeout(() => {
} uni.navigateBack({
}); success: function () {
}, 500) beforePage.$vm.getsplice(that.index); // 执行前一个页面的created方法
} },
} });
); }, 500);
}, }
confirmOpenTime(r){ }
this.model.OpenTime=r.year+"-"+r.month+"-"+r.day );
}, },
confirmOpenTime(r) {
onRemove1(index) { this.model.OpenTime = r.year + "-" + r.month + "-" + r.day;
this.model.ImageList.splice(index, 1); },
},
clickItem(index) {//类型选择 onRemove1(index) {
this.TypeName = this.typeList[index].Name; this.model.ImageList.splice(index, 1);
this.model.Type = this.typeList[index].Id; },
}, clickItem(index) {
clickItem2(index){//品牌归属地 //类型选择
this.BrandTypeName = this.brandTypelist[index].Name; this.TypeName = this.typeList[index].Name;
this.model.BrandType = this.brandTypelist[index].Id; this.model.Type = this.typeList[index].Id;
}, },
clickItem3(index){//行业 clickItem2(index) {
this.BusinessName = this.yeTaiList[index].Name; //品牌归属地
this.model.BusinessType = this.yeTaiList[index].Id; this.BrandTypeName = this.brandTypelist[index].Name;
}, this.model.BrandType = this.brandTypelist[index].Id;
clickItem4(index){//类别 },
this.CategoryName = this.shenList[index].Name; clickItem3(index) {
this.model.Category = this.shenList[index].Id; //行业
}, this.BusinessName = this.yeTaiList[index].Name;
this.model.BusinessType = this.yeTaiList[index].Id;
uploadSuccessHandler(data, index, lists) { },
let r = JSON.parse(data); clickItem4(index) {
console.log(r) //类别
this.model.ImageList.push(r.data); this.CategoryName = this.shenList[index].Name;
}, this.model.Category = this.shenList[index].Id;
enlarge(file) { },
// 全屏 clickItem5(index) {
this.videoContext = uni.createVideoContext('myVideo'); //品牌
this.videoContext.requestFullScreen({ this.brandName = this.brandList[index].Name;
direction:0 this.model.ExistBrandId = this.brandList[index].ID;
}) },
uploadSuccessHandler(data, index, lists) {
}, let r = JSON.parse(data);
videoControl(e){ console.log(r);
if(e.detail.fullScreen==false){ this.model.ImageList.push(r.data);
this.videoContext.stop() },
this.controls=false enlarge(file) {
}else{ // 全屏
this.videoContext.play() this.videoContext = uni.createVideoContext("myVideo");
this.controls=true this.videoContext.requestFullScreen({
} direction: 0,
}, });
upvideo() { },
let that = this videoControl(e) {
uni.chooseVideo({ if (e.detail.fullScreen == false) {
count: 1, this.videoContext.stop();
sourceType: ['camera', 'album'], this.controls = false;
success: function(res) { } else {
console.log(res) this.videoContext.play();
that.upFile(res.tempFilePath, 1) this.controls = true;
uni.showLoading({ }
title: '上传中...' },
}) upvideo() {
let that = this;
}, uni.chooseVideo({
fail(err) { count: 1,
console.log(err, ) sourceType: ["camera", "album"],
} success: function (res) {
}); console.log(res);
}, that.upFile(res.tempFilePath, 1);
upFile(filePath, type) { uni.showLoading({
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ? uni.getStorageSync("mall_UserInfo").MallBaseId : title: "上传中...",
1; });
let action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId },
let that = this fail(err) {
uni.uploadFile({ console.log(err);
url: action, },
filePath: filePath, });
name: 'file', },
formData: { upFile(filePath, type) {
user: 'tesdt' let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId
}, ? uni.getStorageSync("mall_UserInfo").MallBaseId
success: (uploadFileRes) => { : 1;
uni.hideLoading() let action =
if (uploadFileRes.statusCode == 200) { this.host2 + "/api/File/UploadTencent?MallBaseId=" + MallBaseId;
let data = JSON.parse(uploadFileRes.data) let that = this;
that.model.VideoUrl=data.data uni.uploadFile({
url: action,
} filePath: filePath,
name: "file",
}, formData: {
fail: function(res) { user: "tesdt",
console.log(res) },
wx.showToast({ success: (uploadFileRes) => {
title: '上传失败!', uni.hideLoading();
icon: 'none', if (uploadFileRes.statusCode == 200) {
duration: 1000 let data = JSON.parse(uploadFileRes.data);
}) that.model.VideoUrl = data.data;
} }
}); },
}, fail: function (res) {
previewImage(imgs,i) { console.log(res);
wx.showToast({
uni.previewImage({ title: "上传失败!",
urls: imgs, icon: "none",
current: i, duration: 1000,
longPressActions: { });
itemList: ["发送给朋友", "保存图片", "收藏"], },
success: function(data) {}, });
fail: function(err) { },
console.log(err.errMsg); previewImage(imgs, i) {
}, uni.previewImage({
}, urls: imgs,
}); current: i,
}, longPressActions: {
reloadUserinfo() { itemList: ["发送给朋友", "保存图片", "收藏"],
this.u = uni.getStorageSync("mall_UserInfo"); success: function (data) {},
this.GetAuthenticationTypeEnumList()//类型 fail: function (err) {
this.GetBrandTypeEnumList()//品牌归属地枚举 console.log(err.errMsg);
this.GetBusinessTypeEnumList()//申请认证行业枚举 },
this.GetAuthenticationCategoryEnumList()//认证分类枚举 },
}, });
//关闭登录窗口 },
gbAuth(){ reloadUserinfo() {
uni.navigateBack() 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> </script>
<style> <style>
.first-shop{background: #f6f6f6;padding: 30rpx;min-height: 100vh;font-family: pingfang;} .first-shop {
.first-shop .label-text{ background: #f6f6f6;
font-size: 28rpx; padding: 30rpx;
color: #1F1F1F; min-height: 100vh;
font-weight: 600; font-family: pingfang;
margin-top: 40rpx; }
} .first-shop .label-text {
.first-shop .slot-btn{ font-size: 28rpx;
width: 220rpx; color: #1f1f1f;
height: 220rpx; font-weight: 600;
background: #F5F5F5; margin-top: 40rpx;
border-radius: 17rpx; }
display: flex; .first-shop .slot-btn {
align-items: center; width: 220rpx;
justify-content: center; height: 220rpx;
} background: #f5f5f5;
.first-shop .slot-btn .image{ border-radius: 17rpx;
width: 54rpx; display: flex;
height: auto; align-items: center;
} justify-content: center;
.first-shop .bottom-border{ }
border-bottom: 3rpx #DADCE6 solid; .first-shop .slot-btn .image {
} width: 54rpx;
#myVideo{ height: auto;
width: 150px; height: 200px; }
} .first-shop .bottom-border {
.imglist{ border-bottom: 3rpx #dadce6 solid;
width: 100%; }
display: flex; #myVideo {
flex-wrap: wrap; width: 150px;
} height: 200px;
.imglist-item{ }
width: 180rpx; .imglist {
height: 180rpx; width: 100%;
border-radius: 4px; display: flex;
margin-left: 15px; flex-wrap: wrap;
margin-bottom: 10px; }
} .imglist-item {
width: 180rpx;
height: 180rpx;
border-radius: 4px;
margin-left: 15px;
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; overflow: hidden;
overflow: hidden; 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="搜索"
</view> :clearabled="true"
<view style="display: flex;align-items: center;margin-bottom: 30rpx;padding: 0px 15px;"> style="width: 95%"
<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> :show-action="false"
<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> radius="40"
</view> v-model="msg.Title"
<u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty> @search="getList(1)"
<scroll-view v-else :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @custom="getList(1)"
@scrolltolower="lower" style="height: calc(100vh - 189px);"> ></u-search>
<view style="font-size: 30rpx;font-weight: 700;color: #111;padding: 0 15px;">资讯信息</view> </view>
<view> <view
<view class="koraNewsList" v-for="(item,index) in dataList" :key="index" @click="goNewsDetail(item)"> style="
<view class="koraNews-time">{{item.CreateDate?item.CreateDate.replace('T',' '):''}}</view> display: flex;
<view class="koraNews-box"> align-items: center;
<view class="newsimgs" style="position: relative;"> margin-bottom: 30rpx;
<image :src="item.CoverImg" mode="aspectFill" class='n-img'/> padding: 0px 15px;
<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> <image
</view> @click="goNewFirstShop"
<view class="box-conet"> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616490607000_36.png"
<view class="koraRName">{{item.Title}}</view> style="flex: 1; width: 1px; margin-right: 15rpx"
<view class="koraRName-f">{{item.Subtitle}}</view> mode="widthFix"
</view> ></image>
</view> <image
@click="goMyFirstShop"
</view> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616490607000_108.png"
</view> style="flex: 1; width: 1px; margin-left: 15rpx"
mode="widthFix"
></image>
<u-loadmore </view>
:status="status" <u-empty v-if="dataList.length == 0" text="暂无数据" mode="data"></u-empty>
:load-text="loadText" <scroll-view
:font-size="24" v-else
:margin-top="20" :scroll-y="true"
:margin-bottom="20" :enable-back-to-top="true"
bg-color="#F6F6F6" :enable-flex="true"
/> @scrolltolower="lower"
</scroll-view> style="height: calc(100vh - 189px)"
<tabbars></tabbars> >
</view> <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> </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() {//朋友圈 };
let uid = uni.getStorageSync("mall_UserInfo") ? },
uni.getStorageSync("mall_UserInfo").UserId : onShareTimeline() {
0; //朋友圈
if (uid == 0) { let uid = uni.getStorageSync("mall_UserInfo")
uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0; ? uni.getStorageSync("mall_UserInfo").UserId
} : 0;
let SmallShopId = uni.getStorageSync("mall_UserInfo") ? if (uid == 0) {
uni.getStorageSync("mall_UserInfo").SmallShopId : uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
0; }
if (SmallShopId == 0) { let SmallShopId = uni.getStorageSync("mall_UserInfo")
//如果微店id为0 去找所属微店id ? uni.getStorageSync("mall_UserInfo").SmallShopId
SmallShopId = uni.getStorageSync("mall_UserInfo") ? : 0;
uni.getStorageSync("mall_UserInfo").UserSmallShopId : if (SmallShopId == 0) {
0; //如果微店id为0 去找所属微店id
} SmallShopId = uni.getStorageSync("mall_UserInfo")
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0; ? uni.getStorageSync("mall_UserInfo").UserSmallShopId
return { : 0;
title: '首店经济', }
query: "user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up, let Up = uni.getStorageSync("mall_UserInfo")
imageUrl: "", ? uni.getStorageSync("mall_UserInfo").UserPageType
}; : 0;
}, return {
onShareAppMessage(res) {//朋友 title: "首店经济",
let uid = uni.getStorageSync("mall_UserInfo") ? query: "user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up,
uni.getStorageSync("mall_UserInfo").UserId : imageUrl: "",
0; };
if (uid == 0) { },
uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0; onShareAppMessage(res) {
} //朋友
let SmallShopId = uni.getStorageSync("mall_UserInfo") ? let uid = uni.getStorageSync("mall_UserInfo")
uni.getStorageSync("mall_UserInfo").SmallShopId : ? uni.getStorageSync("mall_UserInfo").UserId
0; : 0;
if (SmallShopId == 0) { if (uid == 0) {
//如果微店id为0 去找所属微店id uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
SmallShopId = uni.getStorageSync("mall_UserInfo") ? }
uni.getStorageSync("mall_UserInfo").UserSmallShopId : let SmallShopId = uni.getStorageSync("mall_UserInfo")
0; ? uni.getStorageSync("mall_UserInfo").SmallShopId
} : 0;
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0; if (SmallShopId == 0) {
return { //如果微店id为0 去找所属微店id
title: '首店经济', SmallShopId = uni.getStorageSync("mall_UserInfo")
path: "/pages/kotra/news?user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up, ? uni.getStorageSync("mall_UserInfo").UserSmallShopId
imageUrl: "", : 0;
}; }
let Up = uni.getStorageSync("mall_UserInfo")
}, ? uni.getStorageSync("mall_UserInfo").UserPageType
mounted(){ : 0;
uni.setNavigationBarTitle({ return {
title: this.pageTitle, title: "首店经济",
}); path:
this.getList(1); "/pages/kotra/news?user_id=" +
}, uid +
methods: { "&SmallShopId=" +
//获取数据 SmallShopId +
getList(num) { "&Up=" +
if (num == 1) { Up,
this.dataList = []; imageUrl: "",
} };
uni.showLoading({ },
title: '加载中' mounted() {
}); uni.setNavigationBarTitle({
this.request2({ title: this.pageTitle,
url: "/api/AppletTrade/GetNewsPage", });
data: this.msg, this.getList(1);
}, this.getCommpanyStatus();
(res) => { },
uni.hideLoading(); methods: {
if (res.resultCode == 1) { //获取数据
this.dataList = this.dataList.concat(res.data.pageData); getList(num) {
this.pageCount = res.data.pageCount; if (num == 1) {
} this.dataList = [];
} }
); uni.showLoading({
}, title: "加载中",
//滚动加载 });
lower(e) { this.request2(
if (this.msg.pageIndex < this.pageCount) { {
this.msg.pageIndex++; url: "/api/AppletTrade/GetNewsPage",
this.status = "loading"; data: this.msg,
this.getList(); },
} else { (res) => {
this.status = "nomore"; uni.hideLoading();
} if (res.resultCode == 1) {
}, this.dataList = this.dataList.concat(res.data.pageData);
//跳转至新闻详情 this.pageCount = res.data.pageCount;
goNewsDetail(item){ }
uni.navigateTo({ }
url: '/pages/kotra/newsInDetail?Id=' + item.Id );
}); },
}, //滚动加载
goNewFirstShop(){ lower(e) {
uni.navigateTo({ if (this.msg.pageIndex < this.pageCount) {
url: '/pages/kotra/firstShop/firstShop' this.msg.pageIndex++;
}); this.status = "loading";
}, this.getList();
goMyFirstShop(){ } else {
uni.navigateTo({ this.status = "nomore";
url: '/pages/kotra/firstShop/list' }
}); },
}, //跳转至新闻详情
} 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> </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