| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <template>
- <view class="app-content">
- <view class="img_box">
- <image :src="imgUrl" class="img_url"></image>
- </view>
- <view class="intro">
- <view>1、保存图片分享给供货商,供货商识别并注册</view>
- <view>2、直接打开分享给供货商注册也可以</view>
- <view>3、奖金分二次发放,供货商注册并审核通过奖励10元,供货商线上营业额达20万元,奖励290元</view>
- <view>4、只能邀请城市批发商,昆明批发商无法使用</view>
- <view>5、如有疑问,请<text style="color:blue" @click="getCustomService()">点我联系客服</text></view>
- </view>
- <div class="confirm-btn">
- <button class="admin-button-com big blue" @click="downloadImg">保存图片邀请</button>
- </div>
- <div class="confirm-btn1">
- <button class="admin-button-com big blue" @click="goToMallPt()">直接打开邀请</button>
- </div>
- </view>
- </template>
- <script>
- import { applyInviteGhsPoster } from '@/api/apply/index'
- import { getWeixinId } from "@/api/invite/index";
- import { mapGetters } from "vuex";
- export default {
- data() {
- return {
- imgUrl: '',
- getappIdList: {}
- }
- },
- computed: {
- ...mapGetters({ loginInfo: "getLoginInfo" })
- },
- methods: {
- getCustomService(){
- let self = this;
- uni.showModal({
- title: "请加客服微信",
- content: "15280215347",
- cancelText: "取消",
- confirmText: "复制",
- success: function (res) {
- if (res.confirm) {
- uni.setClipboardData({
- data: "15280215347",
- success: function() {
- self.$msg("已复制")
- }
- });
- }
- },
- })
- },
- init() {
- this.getImg()
- getWeixinId().then(res => {
- this.getappIdList = res.data
- });
- },
- downloadImg() {
- uni.downloadFile({
- url: this.imgUrl,
- success: (res) => {
- console.log(res)
- uni.saveImageToPhotosAlbum({
- filePath: res.tempFilePath,
- success: function() {
- uni.showToast({
- title: '保存成功',
- icon: 'none'
- });
- },
- fail: (res) => {
- // this.$msg('保存失败')
- uni.showToast({
- title: '保存失败',
- icon: 'none'
- });
- }
- })
- },
- })
- },
- getImg() {
- applyInviteGhsPoster().then(res => {
- console.log(res)
- this.imgUrl = res.data.imgUrl
- }).catch(err => {})
- },
- goToMallPt () {
- //查看分享的路径,不要删除 shish 20210517
- console.log('pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId)
- getWeixinId().then(res => {
- uni.navigateToMiniProgram({
- appId: res.data.ghs.miniAppId,
- path: 'pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId,
- //develop 开发版 trial 体验版 release 正式版
- envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
- extraData: {},
- success(res) {
- // 打开成功
- }
- })
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .app-content{
- overflow: hidden;
- .intro{
- padding:50upx 35upx 0 35upx;
- font-size:30upx;
- view{
- margin-top:15upx;
- }
- }
- }
- .img_box{
- height: 450upx;
- box-sizing: border-box;
- &>.img_url{
- height: 450upx;
- width: 450upx;
- margin: 50upx auto;
- }
- }
- // 按钮
- .confirm-btn {
- width: calc(100% - 60upx);
- margin: 50upx 30upx 20upx;
- .admin-button-com {
- width: 100%;
- }
- }
- // 按钮
- .confirm-btn1 {
- width: calc(100% - 60upx);
- margin: 50upx 30upx 20upx;
- .admin-button-com {
- width: 100%;
- }
- }
- </style>
|