Files
2026-03-25 15:53:37 +08:00

108 lines
2.7 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- +----------------------------------------------------------------------
| 麦沃德科技赋能开发者助力商协会发展
+----------------------------------------------------------------------
| Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
+----------------------------------------------------------------------
| 沃德商协会系统并不是自由软件不加密并不代表开源未经许可不可自由转售和商用
+----------------------------------------------------------------------
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
+----------------------------------------------------------------------
| 添加成功 开发者: 麦沃德科技-半夏
+---------------------------------------------------------------------- -->
<template>
<view class="container" :style="{'--theme-color': themeColor}">
<!-- 标题栏 -->
<title-bar :showBack="true" :title="pageType == 2 ? '修改成功' : '添加成功'"></title-bar>
<!-- 内容区 -->
<view class="container-main">
<view class="main-image">
<image class="icon" src="/static/check.png" mode="aspectFit"></image>
</view>
<view class="main-title">{{pageType == 2 ? '修改成功' : '添加成功'}}</view>
<view class="main-subtitle">已成功{{pageType == 2 ? '修改' : '添加'}}产品请前往列表查看</view>
<view class="main-btn" @click="goBack">返回列表</view>
</view>
</view>
</template>
<script>
import { mapState } from "vuex"
export default {
data() {
return {
// 页面类型
pageType: 1,
};
},
computed: {
...mapState({
themeColor: state => state.app.themeColor,
})
},
onLoad(option) {
this.pageType = option.type || 1
},
methods: {
// 返回列表
goBack() {
if (getCurrentPages().length == 1) {
uni.switchTab({
url: "/pages/index/index"
})
} else {
uni.navigateBack()
}
},
}
}
</script>
<style lang="scss">
page {
background: #ffffff;
}
.container {
.container-main {
padding: 144rpx 48rpx 32rpx;
.main-image {
width: 200rpx;
height: 200rpx;
margin: 0 auto;
padding: 48rpx;
background: var(--theme-color);
border-radius: 50%;
}
.main-title {
color: #333;
font-size: 36rpx;
font-weight: 600;
line-height: 50rpx;
margin-top: 48rpx;
text-align: center;
}
.main-subtitle {
color: #999;
font-size: 24rpx;
line-height: 34rpx;
margin-top: 24rpx;
text-align: center;
}
.main-btn {
color: #FFF;
font-size: 32rpx;
line-height: 44rpx;
padding: 34rpx;
border-radius: 16rpx;
text-align: center;
margin-top: 48rpx;
background: var(--theme-color);
}
}
}
</style>