123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415 |
- <template>
- <view class="add-business-box">
- <Navbar :title="_userInfo.balance === 1 ? '顾客审核' : '顾客审核'" color="#333"></Navbar>
- <view class="content">
- <view class="item">
- <view class="label">店铺名称</view>
- {{info.shopName}}
- </view>
- <view class="item">
- <view class="label">主营项目</view>
- {{info.manageContent}}
- </view>
- <view class="item">
- <view class="label">商家类型</view>
- {{info.typeName}}
- </view>
- <view class="item">
- <view class="label">联系方式</text></view>
- {{info.shopPhone}}
- </view>
- <view class="item">
- <view class="label">引荐人</view>
- {{info.bindingUid}}
- </view>
- <view class="item item2">
- <view class="label">地址信息</view>
- {{info.shopAddress}}
- </view>
- <view class="item item2">
- <view class="label">商家描述</view>
- {{info.describe}}
- </view>
- <view class="item item2 master-img-box">
- <view class="label">商家主图</view>
- <view class="master-img">
- <image :src="info.shopIcon" class="img" mode=""></image>
- <!-- <IconText :code="`\ue84a`" size="12" color="#BDBBBB"></IconText> -->
- </view>
- </view>
- <view class="item item2">
- <view class="label">商家图片</view>
- <view class="upload-box">
- <view class="pic-box" v-for="item in info.shopPics" :key="item">
- <image :src="item" class="pic" mode="aspectFill" @click="preview(item)"></image>
- </view>
- </view>
- </view>
- <view class="item item2">
- <view class="label">商家视频</view>
- <view class="upload-box">
- <view class="pic-box">
- <video v-if="info.shopVideo" :src="info.shopVideo" class="pic"></video>
- </view>
- </view>
- </view>
- </view>
- <view class="bottom">
- <div class="btn btn2" @click="examineRefuse">
- 拒绝
- </div>
- <div class="btn" @click="examinePass">
- 审核通过
- </div>
- </view>
- </view>
- </template>
- <script lang='ts'>
- import {
- Component,
- Prop,
- Vue
- } from 'vue-property-decorator';
- import {
- namespace
- } from 'vuex-class';
- const baseModule = namespace('base');
- @Component({})
- export default class AddBusiness extends Vue {
- @baseModule.Getter('_userInfo') _userInfo: any;
- typeList: any = [];
- shopType: any = {};
- addressInfo: any = {};
- info: any = {};
- data: any = {
- shopName: '',
- shopPhone: '',
- manageContent: '',
- bindingUid: null,
- shopType: null,
- shopAddress: '',
- house: '',
- describe: '',
- shopIcon: '',
- shopPics: [],
- lng: null,
- lat: null
- };
- onLoad() {
- let query = this.$Route.query;
- if (query.id) this.getInfo();
- // this.getTypeList();
- }
-
- preview(url: string): void {
- uni.previewImage({
- current: url, // 当前显示图片的http链接
- urls: [url] // 需要预览的图片http链接列表
- });
- }
- getInfo() {
- this.$http
- .get({
- url: this.$api.examineInfo,
- data: {
- id: this.$Route.query.id
- }
- })
- .then((res: any) => {
- this.info = res;
- }, (err: any) => {
- console.log(err);
- });
- }
- getTypeList() {
- this.$http
- .get({
- url: this.$api.getBusinessTypeList,
- })
- .then((res: any) => {
- this.typeList = res.list;
- }, (err: any) => {
- console.log(err);
- });
- }
- changeType(val: any) {
- let value = +val.detail.value;
- this.shopType = this.typeList[value];
- this.data.shopType = this.shopType.id;
- }
- getLocation() {
- uni.getLocation({
- type: 'wgs84',
- success: (res: any) => {
- // console.log(res, '经纬度')
- if (res.errMsg == 'getLocation:ok') {
- uni.chooseLocation({
- // 传入你要去的纬度
- latitude: this.data.lat || res.latitude,
- // 传入你要去的经度
- longitude: this.data.lng || res.longitude,
- // 传入你要去的地址信息 不填则为空
- // 缩放大小
- success: (info: any) => {
- this.data = {
- ...this.data,
- lat: info.latitude,
- lng: info.longitude,
- shopAddress: info.address
- };
- console.log(this.data)
- }
- });
- }
- }
- });
- }
- handleMasterImg() {
- uni.chooseImage({
- count: 1, //默认9
- sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- success: (res) => {
- const tempFilePaths: any = res.tempFilePaths;
- uni.showLoading({
- title: '上传中...'
- });
- this.$http
- .upPic({
- filePath: res.tempFilePaths[0]
- })
- .then((res: any) => {
- this.data.shopIcon = res;
- uni.hideLoading();
- })
- .catch((err: any) => {
- uni.hideLoading();
- console.log(err);
- });
- }
- });
- }
- getImgs(pics: any) {
- this.data.shopPics = pics;
- }
- handleConfirm() {
- // console.log(this.data)
- uni.showLoading({
- title: '加载中...'
- });
- this.$http
- .post({
- url: this.$api.addBusiness,
- data: this.data
- })
- .then((res: any) => {
- uni.hideLoading();
- uni.showToast({
- title: '店铺入驻申请审核中,请稍后...',
- icon: 'none'
- });
- this.getInfo();
- }, (err: any) => {
- console.log(err);
- uni.hideLoading();
- });
- }
- handleUpdate() {
- console.log(this.data)
- uni.showLoading({
- title: '加载中...'
- });
- this.$http
- .put({
- url: this.$api.updateBusinessInfo,
- data: {
- id: this.info.id,
- ...this.data
- }
- })
- .then((res: any) => {
- uni.hideLoading();
- uni.showToast({
- title: '店铺入驻申请审核中,请稍后...',
- icon: 'none'
- });
- this.getInfo();
- }, (err: any) => {
- console.log(err);
- uni.hideLoading();
- });
- }
- examineRefuse() {
- this.$http
- .put({
- url: this.$api.examineRefuse,
- data: {
- id: this.info.id,
- rollback: '已拒绝'
- }
- })
- .then((res: any) => {
- uni.hideLoading();
- uni.showToast({
- title: '已拒绝审核',
- icon: 'none'
- });
- this.$Router.back(1);
- this.getInfo();
- }, (err: any) => {
- console.log(err);
- uni.hideLoading();
- });
- }
- examinePass() {
- this.$http
- .put({
- url: this.$api.examinePass,
- data: {
- id: this.info.id,
- }
- })
- .then((res: any) => {
- uni.hideLoading();
- uni.showToast({
- title: '已通过审核',
- icon: 'none'
- });
- this.$Router.back(1);
- this.getInfo();
- }, (err: any) => {
- console.log(err);
- uni.hideLoading();
- });
- }
- }
- </script>
- <style lang="scss" scoped>
- .add-business-box {
- .content {
- padding-bottom: vw(100);
- .item {
- height: vw(55);
- background: #fff;
- margin-top: vw(1);
- @include flex-x(flex-start);
- padding: 0 vw(15);
- font-size: vw(15);
- .label {
- @include word-vw(14, #333);
- width: vw(120);
- flex-shrink: 1;
- text {
- @include word-vw(14, #999);
- }
- }
- .input {
- width: vw(240);
- height: vw(50);
- background: #F6F6F6;
- border-radius: vw(5);
- padding: 0 vw(16);
- font-size: vw(14);
- box-sizing: border-box;
- }
- .selector {
- @include flex-x();
- @include word-vw(15, #999);
- .icon {
- margin-left: vw(5);
- }
- }
- .position {
- @include word-vw(14, #999);
- @include flex-x(flex-end);
- width: vw(240);
- .icon {
- margin-left: vw(5);
- }
- }
- }
- .item2 {
- height: auto;
- min-height: vw(55);
- padding: vw(12) vw(15);
- @include flex-x(flex-start, flex-start);
- .label {
- align-self: flex-start;
- padding-top: vw(3);
- }
- }
- .master-img-box {
- @include flex-x();
- }
- .master-img {
- @include flex-x();
- .img {
- width: vw(40);
- height: vw(40);
- background: #ccc;
- border-radius: vw(20);
- margin-right: vw(5);
- }
- }
- .upload-box {
- @include flex-x(flex-start);
- flex-wrap: wrap;
- }
- .pic-box {
- width: 1/3 * 100%;
- @include flex-y(center, center);
- }
- .pic {
- width: vw(66);
- height: vw(66);
- border-radius: vw(5);
- margin-bottom: vw(8);
- }
- }
- .bottom {
- width: 100%;
- position: fixed;
- bottom: 0;
- height: vw(70);
- background: #fff;
- @include flex-x(center);
- .btn {
- @include flex-x(center);
- @include solid-btn(148, 50, #fff, 10);
- margin: vw(5);
- box-sizing: border-box;
- }
- .btn2 {
- background: #FFF7F8;
- color: #333;
- border: vw(1) solid $btn-color;
- }
- }
- }
- </style>
|