main
fanfan 7 months ago
commit b4f3894886
  1. 22
      pages/goods/list.vue
  2. 1
      pages/invite/index.vue
  3. 2
      pages/news/rules/index.vue
  4. 8
      pages/order/refund/index.vue
  5. 2
      pages/order/refund/refund.vue
  6. 97
      pages/user/index.vue

@ -12,7 +12,7 @@
<template v-if="options.categoryId">
<view class="goodsban" v-if="tabbar && tabbar.length > 0">
<scroll-view class="typeList" scroll-x="true">
<view v-for="(item,index) in tabbar" :key="index" class="bandsImg" @click="onChage(item,1)"
<view v-for="(item,index) in tabbar" :key="index" class="bandsImg" @click="onChage(item,1,index)"
:style="{'color':item.category_id==isBanrdActive?'#F43B21':'#5A5A5A','border':item.category_id==isBanrdActive?'1rpx solid #F22029':'1rpx solid #E7E7E7'}">
<image :src="item.image?item.image.external_url:''" mode="aspectFill"></image>
<view class="typeItem">{{item.name}}</view>
@ -329,19 +329,25 @@
.then(res => {
if (res.data.list.length > 0) {
that.tabbar = res.data.list;
res.data.list.forEach(item => {
item.children.forEach(item_1 => {
that.goodsType.push(item_1)
})
});
console.log(that.goodsType, that.tabbar)
// res.data.list.forEach(item => {
// item.children.forEach(item_1 => {
// that.goodsType.push(item_1)
// })
// });
// console.log(that.goodsType, that.tabbar)
}
})
.catch(reject)
})
},
onChage(item, type) {
onChage(item, type,index) {
if (type == 1) {
if(this.tabbar && this.tabbar[index].children && this.tabbar[index].children.length > 0){
this.goodsType= this.tabbar[index].children;
}
this.isActive = '';
this.keyName2 = ''
if (item.category_id == this.isBanrdActive) {
this.isBanrdActive = '';
this.keyName1 = ''

@ -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',

@ -20,7 +20,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:{

@ -20,19 +20,19 @@
<image class="arrow" :src="$picUrl+'/static/news/icon-arrow.png'"></image>
</view>
<view class="item" @click="openPage(2)">
<image class="icon" :src="$picUrl+'/static/news/icon-refund-03.png'"></image>
<image class="icon" :src="$picUrl+'/static/news/icon-refund-02.png'"></image>
<view class="info">
<view class="a">我要退款无需退货</view>未收到货或与商家协商之后申请
</view>
<image class="arrow" :src="$picUrl+'/static/news/icon-arrow.png'"></image>
</view>
<!-- <view class="item" @click="openPage(3)">
<view class="item" @click="openPage(3)">
<image class="icon" :src="$picUrl+'/static/news/icon-refund-03.png'"></image>
<view class="info">
<view class="a">我要换货</view>对收到的商品不满意可与商家协商换货
</view>
<image class="arrow" src="/static/news/icon-arrow.png"></image>
</view> -->
<image class="arrow" :src="$picUrl+'/static/news/icon-arrow.png'"></image>
</view>
</view>
</view>
</template>

@ -14,7 +14,7 @@
<view class="item">
<view class="l">申请类型</view>
<view class="r">
{{type==1?'我要退货退款':'我要退款(无需退货)'}}
{{ type==1 ? '我要退货退款' : (type==2 ? '我要退款(无需退货)' : '我要换货') }}
</view>
</view>

@ -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