用户邀请码与取消订单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" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
<<<<<<< HEAD
"appid" : "wxe843b6d7a4bd3389", "appid" : "wxe843b6d7a4bd3389",
=======
"appid" : "wxa3127ed5c3542a28",
>>>>>>> beac19d5a037464834b39080367b0ebe8183fee7
"libVersion" : "latest", "libVersion" : "latest",
"setting" : { "setting" : {
// TLS // TLS

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

@ -21,7 +21,7 @@
onLoad(options){ onLoad(options){
this.itemInfo = JSON.parse(decodeURIComponent(options.itemInfo)) this.itemInfo = JSON.parse(decodeURIComponent(options.itemInfo))
this.title = this.itemInfo.title; 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:{ methods:{

@ -33,15 +33,18 @@
<text lines="1" class="text_2">消息</text> <text lines="1" class="text_2">消息</text>
<button open-type="contact" v-if="isLogin"></button> <button open-type="contact" v-if="isLogin"></button>
</view> </view>
<!-- / --> <!-- / -->
<view class="group_4" @click="lookMemberCode('2')" <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> <image :src="$picUrl+'/static/user/code.png'" class="thumbnail_2"></image>
<text lines="1" class="text_3">会员码</text> <text lines="1" class="text_3">会员码</text>
</view> </view>
<!-- --> <!-- -->
<view class="group_5" @click="lookMemberCode('3')" <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> <image :src="$picUrl+'/static/user/code.png'" class="thumbnail_3"></image>
<text lines="1" class="text_4">分销码</text> <text lines="1" class="text_4">分销码</text>
</view> </view>
@ -618,9 +621,9 @@
</view> </view>
<view class="memberCode" v-if="memberCode" @click="memberCode=false"> <view class="memberCode" v-if="memberCode" @click="memberCode=false">
<view class="codeMain1" v-if="lookMemberType == 2"> <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>
<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="btn" @click.stop="goMember('hy')"></view>
<!-- <view class="myCode"> <!-- <view class="myCode">
<text v-if="lookMemberType == 2">我的专属会员识别码</text> <text v-if="lookMemberType == 2">我的专属会员识别码</text>
@ -635,15 +638,18 @@
</view> --> </view> -->
</view> </view>
<view class="codeMain2" v-if="lookMemberType == 3"> <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>
<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 class="btn" @click.stop="goMember('fx')"></view>
</view> </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> </view>
</template> </template>
<script> <script>
const ctx = uni.createCanvasContext('myCanvas')
import { import {
checkLogin checkLogin
} from '@/core/app' } from '@/core/app'
@ -656,8 +662,11 @@
export default { export default {
data() { data() {
return { return {
devicePixelRatio: 750 / uni.getSystemInfoSync().windowHeight,
dealerInviteQrcode: "", dealerInviteQrcode: "",
qrcode: "", qrcode: "",
qrcode1: "",
qrcode2: "",
inviteQrcode: "", inviteQrcode: "",
lookMemberType: 2, lookMemberType: 2,
isTop: false, isTop: false,
@ -704,6 +713,65 @@
} }
}, },
methods: { 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) { onChooseAvatar(e) {
console.log(e) console.log(e)
let that = this let that = this
@ -822,6 +890,7 @@
if (data.user_type == 30 || data.user_type == 40) { if (data.user_type == 30 || data.user_type == 40) {
that.getDealerInviteQrcode() that.getDealerInviteQrcode()
} }
// that.getMembershipInviteQrcode() // that.getMembershipInviteQrcode()
// that.getDealerInviteQrcode() // that.getDealerInviteQrcode()
resolve(that.userInfo) resolve(that.userInfo)
@ -846,6 +915,7 @@
.then(result => { .then(result => {
that.inviteQrcode = result.message; that.inviteQrcode = result.message;
console.log(this.inviteQrcode) console.log(this.inviteQrcode)
resolve(that.inviteQrcode) resolve(that.inviteQrcode)
}) })
.catch(err => { .catch(err => {
@ -1003,6 +1073,15 @@
this.lookMemberType = val; this.lookMemberType = val;
this.qrcode = val == 2 ? this.inviteQrcode : this.dealerInviteQrcode; this.qrcode = val == 2 ? this.inviteQrcode : this.dealerInviteQrcode;
this.memberCode = true; this.memberCode = true;
if(val == 2){
if(!this.qrcode1){
this.createImge(1,702,702)
}
}else{
if(!this.qrcode2){
this.createImge(2,702,889)
}
}
}, },
myWallet() { myWallet() {
@ -1047,6 +1126,10 @@
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.myCanvas {
position: absolute;
z-index: -1;
}
.goodsInfo1 { .goodsInfo1 {
display: flex; display: flex;
align-items: center; align-items: center;

Loading…
Cancel
Save