用户邀请码与取消订单BUG修复

main
shuxiaoquan 7 months ago
parent 92dd501e9e
commit 2d497e140a
  1. 4
      manifest.json
  2. 1
      pages/invite/index.vue
  3. 2
      pages/news/rules/index.vue
  4. 97
      pages/user/index.vue

@ -92,11 +92,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
<<<<<<< HEAD
"appid" : "wxe843b6d7a4bd3389",
=======
"appid" : "wxa3127ed5c3542a28",
>>>>>>> beac19d5a037464834b39080367b0ebe8183fee7
"libVersion" : "latest",
"setting" : {
// TLS

@ -126,7 +126,6 @@
methods: {
createImge() {
const that = this;
ctx.fillRect(0, 0, 702 / that.devicePixelRatio, 1248 / that.devicePixelRatio);
uni.downloadFile({
url: 'https://www.royaum.com.cn/static/3@2x.png',

@ -21,7 +21,7 @@
onLoad(options){
this.itemInfo = JSON.parse(decodeURIComponent(options.itemInfo))
this.title = this.itemInfo.title;
this.strings = this.itemInfo.content;
this.strings = this.itemInfo.content.replace(/style=\"text-wrap: nowrap;\"/g,'style=\"text-wrap: inherit;\"');;
},
methods:{

@ -33,15 +33,18 @@
<text lines="1" class="text_2">消息</text>
<button open-type="contact" v-if="isLogin"></button>
</view>
<!-- / -->
<!-- / -->
<view class="group_4" @click="lookMemberCode('2')"
v-if="userInfo.user_type == 20 || userInfo.user_type==40">
v-if="userInfo.user_type == 20 || userInfo.user_type==40"
>
<image :src="$picUrl+'/static/user/code.png'" class="thumbnail_2"></image>
<text lines="1" class="text_3">会员码</text>
</view>
<!-- -->
<view class="group_5" @click="lookMemberCode('3')"
v-if="userInfo.user_type == 30 || userInfo.user_type==40">
v-if="userInfo.user_type == 30 || userInfo.user_type==40"
>
<image :src="$picUrl+'/static/user/code.png'" class="thumbnail_3"></image>
<text lines="1" class="text_4">分销码</text>
</view>
@ -618,9 +621,9 @@
</view>
<view class="memberCode" v-if="memberCode" @click="memberCode=false">
<view class="codeMain1" v-if="lookMemberType == 2">
<image class="bg" :show-menu-by-longpress="true" src="https://www.royaum.com.cn/static/1@2x.png">
<image class="bg" :show-menu-by-longpress="true" :src="qrcode1">
</image>
<image class="code" :show-menu-by-longpress="true" :src="qrcode"></image>
<!-- <image class="code" :show-menu-by-longpress="true" :src="qrcode"></image> -->
<view class="btn" @click.stop="goMember('hy')"></view>
<!-- <view class="myCode">
<text v-if="lookMemberType == 2">我的专属会员识别码</text>
@ -635,15 +638,18 @@
</view> -->
</view>
<view class="codeMain2" v-if="lookMemberType == 3">
<image class="bg" :show-menu-by-longpress="true" src="https://www.royaum.com.cn/static/2@2x.png">
<image class="bg" :show-menu-by-longpress="true" :src="qrcode2">
</image>
<image class="code" :show-menu-by-longpress="true" :src="qrcode"></image>
<!-- <image class="code" :show-menu-by-longpress="true" :src="qrcode"></image> -->
<view class="btn" @click.stop="goMember('fx')"></view>
</view>
</view>
<canvas id="myCanvas" class="myCanvas" canvas-id="myCanvas"
:style="{'width': 702/devicePixelRatio+'px',' height': 1000/devicePixelRatio+'px',position: 'absolute',left:'-100000px',top:'-100000px'}"></canvas>
</view>
</template>
<script>
const ctx = uni.createCanvasContext('myCanvas')
import {
checkLogin
} from '@/core/app'
@ -656,8 +662,11 @@
export default {
data() {
return {
devicePixelRatio: 750 / uni.getSystemInfoSync().windowHeight,
dealerInviteQrcode: "",
qrcode: "",
qrcode1: "",
qrcode2: "",
inviteQrcode: "",
lookMemberType: 2,
isTop: false,
@ -704,6 +713,65 @@
}
},
methods: {
createImge(index,w,h) {
const that = this;
ctx.fillRect(0, 0, w / that.devicePixelRatio, h / that.devicePixelRatio);
uni.downloadFile({
url: index == 1?'https://www.royaum.com.cn/static/1@2x.png':'https://www.royaum.com.cn/static/2@2x.png',
success(res) {
console.log(index,w,h)
console.log(index == 1?'https://www.royaum.com.cn/static/1@2x.png':'https://www.royaum.com.cn/static/2@2x.png')
console.log(res.tempFilePath)
console.log("that.qrcode",that.qrcode)
ctx.beginPath(); //
ctx.drawImage(res.tempFilePath, 0, 0, w / that.devicePixelRatio, h / that
.devicePixelRatio);
uni.downloadFile({
url: that.qrcode,
success: (res2) => {
ctx.save(); //
if(index == 1){
ctx.arc(162 / that.devicePixelRatio / 2 + 468 / that.devicePixelRatio,
162 / that.devicePixelRatio / 2 + 480 / that.devicePixelRatio,
162 / that.devicePixelRatio / 2, 0, Math.PI * 2, false);
ctx.clip();
ctx.drawImage(res2.tempFilePath, 468 / that.devicePixelRatio, 480 /
that.devicePixelRatio, 162 / that.devicePixelRatio, 162 / that
.devicePixelRatio);
}else{
ctx.arc(162 / that.devicePixelRatio / 2 + 275 / that.devicePixelRatio,
162 / that.devicePixelRatio / 2 + 635 / that.devicePixelRatio,
162 / that.devicePixelRatio / 2, 0, Math.PI * 2, false);
ctx.clip();
ctx.drawImage(res2.tempFilePath, 275 / that.devicePixelRatio, 635 /
that.devicePixelRatio, 162 / that.devicePixelRatio, 162 / that
.devicePixelRatio);
}
ctx.draw()
uni.canvasToTempFilePath({
width: w / that.devicePixelRatio,
height: h / that.devicePixelRatio,
destWidth: w / that.devicePixelRatio,
destHeight: h / that.devicePixelRatio,
canvasId: 'myCanvas',
success: function(res) {
if(index == 1){
that.qrcode1 = res.tempFilePath
console.log(that.qrcode1)
}else{
that.qrcode2 = res.tempFilePath
console.log(that.qrcode2)
}
ctx.clearRect(0,0,w,h);
}
})
},
})
}
})
},
onChooseAvatar(e) {
console.log(e)
let that = this
@ -822,6 +890,7 @@
if (data.user_type == 30 || data.user_type == 40) {
that.getDealerInviteQrcode()
}
// that.getMembershipInviteQrcode()
// that.getDealerInviteQrcode()
resolve(that.userInfo)
@ -846,6 +915,7 @@
.then(result => {
that.inviteQrcode = result.message;
console.log(this.inviteQrcode)
resolve(that.inviteQrcode)
})
.catch(err => {
@ -1003,6 +1073,15 @@
this.lookMemberType = val;
this.qrcode = val == 2 ? this.inviteQrcode : this.dealerInviteQrcode;
this.memberCode = true;
if(val == 2){
if(!this.qrcode1){
this.createImge(1,702,702)
}
}else{
if(!this.qrcode2){
this.createImge(2,702,889)
}
}
},
myWallet() {
@ -1047,6 +1126,10 @@
}
</script>
<style lang="scss" scoped>
.myCanvas {
position: absolute;
z-index: -1;
}
.goodsInfo1 {
display: flex;
align-items: center;

Loading…
Cancel
Save