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"> <template v-if="options.categoryId">
<view class="goodsban" v-if="tabbar && tabbar.length > 0"> <view class="goodsban" v-if="tabbar && tabbar.length > 0">
<scroll-view class="typeList" scroll-x="true"> <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'}"> :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> <image :src="item.image?item.image.external_url:''" mode="aspectFill"></image>
<view class="typeItem">{{item.name}}</view> <view class="typeItem">{{item.name}}</view>
@ -329,19 +329,25 @@
.then(res => { .then(res => {
if (res.data.list.length > 0) { if (res.data.list.length > 0) {
that.tabbar = res.data.list; that.tabbar = res.data.list;
res.data.list.forEach(item => {
item.children.forEach(item_1 => { // res.data.list.forEach(item => {
that.goodsType.push(item_1) // item.children.forEach(item_1 => {
}) // that.goodsType.push(item_1)
}); // })
console.log(that.goodsType, that.tabbar) // });
// console.log(that.goodsType, that.tabbar)
} }
}) })
.catch(reject) .catch(reject)
}) })
}, },
onChage(item, type) { onChage(item, type,index) {
if (type == 1) { 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) { if (item.category_id == this.isBanrdActive) {
this.isBanrdActive = ''; this.isBanrdActive = '';
this.keyName1 = '' this.keyName1 = ''

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

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

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

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

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