|
|
@@ -13,23 +13,77 @@
|
|
|
<button class="admin-button-com big blue" @click="goToMallPt()">打开商城</button>
|
|
|
</div>
|
|
|
|
|
|
+ <view style="padding-left:30upx;margin-top:50upx;padding-bottom:30upx;">
|
|
|
+ <view style="margin-left:10upx;font-size:30upx;">客服微信二维码<text style="margin-left:30upx;color:#3385FF;font-weight:bold;" @click="clearWx()">清除</text></view>
|
|
|
+ <htz-image-upload :max="1" :compress="true" v-model="currentImgData" :headers="headers"
|
|
|
+ @uploadSuccess="imgUploadSuccess" @imgDelete="imgDeleteFn" :action="loginInfo.imgUploadApi">
|
|
|
+ </htz-image-upload>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { mainGetMallPoster } from '@/api/main'
|
|
|
import { getWeixinId } from "@/api/invite";
|
|
|
+import { modifyWx } from "@/api/shop"
|
|
|
import { mapGetters } from "vuex";
|
|
|
+//图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
|
|
|
+import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
imgUrl: '',
|
|
|
- getappIdList: {}
|
|
|
+ getappIdList: {},
|
|
|
+ headers:{token:''},
|
|
|
+ currentImgData: [],
|
|
|
+ isApple:1
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ htzImageUpload
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ const token = uni.getStorageSync('token')
|
|
|
+ this.headers.token = token
|
|
|
+
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ let type = uni.getSystemInfoSync().platform
|
|
|
+ if(type == 'android'){
|
|
|
+ this.isApple = 0
|
|
|
+ }
|
|
|
+ // #endif
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ this.isApple = 0
|
|
|
+ // #endif
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
|
|
|
},
|
|
|
methods: {
|
|
|
+ imgDeleteFn(res){
|
|
|
+
|
|
|
+ },
|
|
|
+ clearWx(){
|
|
|
+ this.$util.confirmModal({content:'确认清除?'},() => {
|
|
|
+ modifyWx({url:'',isApple:this.isApple}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ imgUploadSuccess(res) {
|
|
|
+ let that = this
|
|
|
+ var _res = JSON.parse(res.data)
|
|
|
+ if(_res.code == 1){
|
|
|
+ this.currentImgData.push(_res.data.bigUrl)
|
|
|
+ modifyWx({url:_res.data.shortUrl,isApple:this.isApple}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
init() {
|
|
|
this.getImg()
|
|
|
getWeixinId().then(res => {
|