@@ -153,6 +153,26 @@ const login = () => {
});
}
+const saveImage = url => {
+ uni.downloadFile({
+ url: url,
+ success: (res) => {
+ if (res.statusCode === 200) {
+ console.log('下载成功');
+ uni.saveFile({
+ tempFilePath: res.tempFilePath,
+ success: function(red) {
+ console.log('-->data',red)
+ uni.$u.toast(`保存路径:${red.savedFilePath}`)
+ }
+ });
+ }else{
+ uni.$u.toast(`保存失败`)
+}
+
export {
ksort,
@@ -172,5 +192,6 @@ export {
objectToUrlParams,
shareMessage,
share,
- login
+ login,
+ saveImage
@@ -42,11 +42,13 @@
title: '该功能需开通永久使用',
subTitle: '做桥架不求人,让你秒变大师',
},
- scene: ''
+ scene: '',
+ setting: null
methods: {
handleOpen(index){
+ if(this.setting.review_mode) return
if(this.vuex_user_data.is_vip == 0){
if(this.$platform === 'ios'){
uni.showModal({
@@ -70,13 +72,19 @@
this.$u.api.userBind({scene:this.scene}).then(res => {
})
- }
+ },
+ getSetting(){
+ this.$u.api.settingGet().then(data => {
+ this.setting = data;
+ })
onLoad(options){
this.scene = options.scene;
if(this.scene){
this.handleBind()
+ this.getSetting();
onShareAppMessage() {
@@ -35,7 +35,7 @@
<u-cell-item title="桥架会员" :border-bottom="false" bg-color="#f9f9f9" @click="handleJumpBuy" v-if="!setting.review_mode">
<view slot="icon" class="icon bridge"></view>
</u-cell-item>
- <u-cell-item title="会员购买记录" :border-bottom="false" bg-color="#f9f9f9" @click="$jump({url:'/pages/my/member-record',type:'to'})">
+ <u-cell-item title="会员购买记录" :border-bottom="false" bg-color="#f9f9f9" v-if="!setting.review_mode" @click="$jump({url:'/pages/my/member-record',type:'to'})">
<view slot="icon" class="icon member"></view>
<u-cell-item title="分销中心" v-if="setting.open_share" :border-bottom="false" bg-color="#f9f9f9" @click="$jump({url:'/pages/share/index',type:'to'})">
@@ -8,7 +8,7 @@
<u-image
width="150"
height="150"
- src="https://xiansin.oss-cn-shenzhen.aliyuncs.com/sange-bridge/images/sample.jpg"
+ :src="vuex_user_data.head_img"
shape="circle"></u-image>
</view>
<view class="share-box dir-top-wrap">
@@ -65,7 +65,7 @@
<u-button shape="circle"
- @click="qrCodeModal.show = false"
+ @click="handleSave"
hover-class="none"
:custom-style="{
background:'linear-gradient(90deg, rgba(4,153,140,1) 0%, rgba(4,153,128,1) 100%, rgba(14,175,160,.5) 100%)',
@@ -121,6 +121,11 @@
this.userData = data;
+ handleSave(){
+ this.$util.saveImage(this.userData.share_qrcode)
+ this.qrCodeModal.show = false
onLoad(){
this.getUser();