界面优化与门店编辑

version/0412
shuxiaoquan 9 months ago
parent 4180ec42d8
commit 4f2418ace9
  1. 11
      api/home/index.js
  2. 40
      pages/index/index.vue
  3. 105
      pages/invite/index.vue
  4. 5
      pages/invite/list.vue
  5. 10
      pages/login/components/mp-weixin-mobile.vue
  6. 2
      pages/news/article/add.vue
  7. 142
      pages/news/park/personal.vue
  8. 84
      pages/user/index.vue
  9. BIN
      static/bg-1.png
  10. BIN
      static/bg-2.png
  11. BIN
      static/bg-3.png
  12. BIN
      static/bg-4.png
  13. BIN
      static/bg-5.png
  14. BIN
      static/bg-6.png
  15. 1615
      utils/qrcode.js

@ -5,13 +5,22 @@ const api = {
list: 'goods/list',
chartsGoodsJing:'goods/chartsGoodsJing',
brandList:'goods/brandList',
getBannerList:'index/getBannerList',
typeList:'category/list',
cityInfo:'goods/cityInfo',
search:'goods/hotWord',
chartsGoodsJing:'goods/chartsGoodsJing'
}
// benner列表
export const getBannerList = (param, option) => {
return request.get(api.getBannerList, param, option)
}
// 门店编辑
export const editShop = (param, option) => {
return request.post('shop/editShop', param, option)
}
// 商品列表
// 门店详情
export const cityInfo = (param, option) => {
return request.get(api.cityInfo, param, option)
}

@ -17,12 +17,16 @@
</view>
<u-search shape="round" :disabled="true" placeholder="iPhone 15" bg-color="#ffffff" :show-action="false"></u-search>
</view>
<view class="chat" v-if="current == 0" @click="toChat()">
<u-icon name="chat" color="#000000" size="70"></u-icon>
<view class="badge">
4
<template v-if="current == 0">
<view class="chat" v-if="isLogin == false" @click="toChat()">
<u-icon name="chat" color="#000000" size="70"></u-icon>
<view class="badge"></view>
</view>
</view>
<view class="chat" v-else>
<u-icon name="chat" color="#000000" size="70"></u-icon>
<button open-type="contact"></button>
</view>
</template>
</view>
<view v-show="current==0">
<view class="tabs">
@ -38,7 +42,7 @@
</view>
<view class="main">
<view class="picContainer">
<u-swiper :list="swiperList" height="196" img-mode="heightFix"></u-swiper>
<u-swiper :list="bannerList" height="196" img-mode="heightFix" @click="gotoDetail"></u-swiper>
</view>
<view class="grid">
<view class="gridRows">
@ -426,7 +430,7 @@
export default{
data(){
return{
isLogin: false,
isTop: false,
// background: {
// backgroundColor: 'transparent',
@ -477,6 +481,7 @@
],
commentList:[
],
bannerList: [],
cityInfo:{},
serveList: [],
couList: [],
@ -524,6 +529,16 @@
url: "/pages/activity/intimate?index="+ i
})
},
/**
* 获取nanner列表
*/
async queryBannerList() {
let {status, data} = await GoodsApi.getBannerList({});
if(status == 200){
this.bannerList = data
}
},
/**
* 获取服务列表
*/
@ -716,6 +731,13 @@
url: '/pages/user/vip/goods'
})
},
gotoDetail(index) {
if(this.bannerList[index].redirect_url){
uni.navigateTo({
url: '/pages/goods/detail?goodsId=' + this.bannerList[index].redirect_url
})
}
},
goDetails(item) {
uni.navigateTo({
url: '/pages/goods/detail?goodsId=' + item.goods_id
@ -790,6 +812,10 @@
this.getCityInfo()
this.getCoupons();
this.getServeList();
this.queryBannerList();
},
onShow() {
this.isLogin = uni.getStorageSync("AccessToken")?true:false
},
onPageScroll(e) {
if (e.scrollTop <= 200 ) { // true

@ -57,33 +57,58 @@
</view>
<view class="invite-bd-d">
<image :src="$picUrl+'/static/news/invite-bg4.png'"></image>
<view class="p">立即邀请</view>
<view class="p" @click="openPage(3)">立即邀请</view>
</view>
</view>
<!-- -->
<view class="invite-popup" v-if="isPopup">
<view class="popup" @longpress="download()">
<image class="bg" :src="$picUrl+'/static/bg-6.png'"></image>
<image class="qrcode" :src="qrcode"></image>
<view class="tips">长按保存图片</view>
<view class="close">
<u-icon color="#fff" size="60" name="close-circle"></u-icon>
</view>
</view>
</view>
</view>
</template>
<script>
import { createQrCodeImg } from '@/utils/qrcode'
import * as newFunApi from '@/api/newFun'
export default{
data(){
return{
qrcode: "",
userInfo: {},
backgroundBg: {
"background": "rgba(255,255,255,0.22)"
},
backgroundBg1: {
"background-color": "transparent"
},
isPopup: true,
info: {},
list: [
'寒雨连江夜入吴',
'平明送客楚山孤',
'洛阳亲友如相问',
'一片冰心在玉壶'
]
list: ["邀请更多好友,获得更多奖金"]
}
},
onReady() {
this.getList();
},
onShow() {
if(uni.getStorageSync("AccessToken")){
this.userInfo = uni.getStorageSync("userInfo");
this.qrcode = createQrCodeImg(this.userInfo.user_id, { 'size': 500 });
}else{
this.userInfo = {}
this.qrcode = ""
}
},
methods: {
download() {
},
async getList() {
uni.showLoading({
title:"加载中"
@ -96,10 +121,22 @@
}
},
openPage(index){
if(!uni.getStorageSync("AccessToken")){
uni.navigateTo({
url: "/pages/login/index"
})
return ;
}
if(index == 1){
uni.navigateTo({
url: "/pages/invite/list"
})
}else if(index == 2){
uni.navigateTo({
url: "/pages/news/user/withdrawal"
})
}else if(index == 3){
this.isPopup = true;
}
},
}
@ -110,6 +147,60 @@
.invite{
min-height: 100vh;
overflow: hidden;
&-popup{
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
position: fixed;
left: 0;
top: 0;
z-index: 55;
.popup{
width: 672rpx;
height: 912rpx;
position: absolute;
left: 50%;
margin-left: -336rpx;
top: 50%;
margin-top: -456rpx;
z-index: 2;
.bg{
width: 672rpx;
height: 100%;
}
.qrcode{
width: 200rpx;
height: 200rpx;
position: absolute;
right: 25rpx;
top: 670rpx;
border: 8rpx solid #FFFFFF;
z-index: 2;
border-radius: 5rpx;
}
.tips{
width: 100%;
height: 30rpx;
position: absolute;
text-align: center;
font-size: 30rpx;
color: #FFFFFF;
left: 0;
bottom: -50rpx;
z-index: 2;
}
.close{
width: 60rpx;
height: 60rpx;
position: absolute;
left: 50%;
bottom: -150rpx;
color: #FFFFFF;
z-index: 2;
}
}
}
&-notice{
background-color: #FF5554;
}

@ -14,7 +14,9 @@
</view>
</view>
</view>
<u-empty text="暂无信息" v-if="total == 0" mode="list"></u-empty>
<view v-if="total == 0" style="margin-top: 250rpx;" >
<u-empty text="暂无信息" mode="list"></u-empty>
</view>
</view>
</template>
@ -40,7 +42,6 @@
uni.hideLoading();
this.list = data.list.data;
this.total = data.list.total
console.log(this.total)
}
},
}

@ -1,8 +1,7 @@
<template>
<!-- 微信授权手机号一键登录 -->
<view class="wechat-auth">
<button class="btn-normal" open-type="getPhoneNumber" @getphonenumber="handelMpWeixinMobileLogin($event)"
@click="clickPhoneNumber">
<button class="btn-normal" open-type="getPhoneNumber" @getphonenumber="handelMpWeixinMobileLogin($event)">
<view class="wechat-auth-container">
<image class="icon" src="../../../static/channel/wechat.png"></image>
<text class="title">微信手机号一键登录</text>
@ -34,7 +33,6 @@
isParty: true,
}
},
methods: {
// :
@ -49,13 +47,16 @@
async handelMpWeixinMobileLogin({
detail
}) {
console.log("handelMpWeixinMobileLogin",detail)
const app = this
app.code = await app.getCode()
if (detail.errMsg != 'getPhoneNumber:ok') {
console.log('微信授权获取手机号失败', detail)
return
}
if (detail.errMsg == 'getPhoneNumber:ok') {
app.isLoading = true
console.log(1111)
store.dispatch('LoginMpWxMobile', {
code: app.code,
encryptedData: detail.encryptedData,
@ -65,6 +66,7 @@
refereeId: store.getters.refereeId
})
.then(result => {
console.log("result",result)
//
app.$toast(result.message);
app.getUserInfo()
@ -74,6 +76,7 @@
setTimeout(() => app.onNavigateBack(1), 2000)
})
.catch(err => {
console.log("err",err)
const resultData = err.result.data
//
if (isEmpty(resultData)) {
@ -90,6 +93,7 @@
getUserInfo() {
UserApi.info()
.then(result => {
console.log("getUserInfo",result)
uni.setStorageSync('userInfo', result.data.userInfo)
})
},

@ -19,7 +19,7 @@
<u-upload :action="action" :header="header" @on-uploaded="success" width="180" height="180" :file-list="fileList" :custom-btn="true" max-count="1">
<template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="/static/news/icon-upload.png"></image>
<image :src="$picUrl+'/static/news/icon-upload.png'"></image>
<view class="1">上传图片</view>
</view>
</template>

@ -4,28 +4,28 @@
<view class="item">
<view class="a">店铺名称</view>
<view class="b">
<input type="text" placeholder="请输入店铺名称" />
<input type="text" v-model="shop_name" placeholder="请输入店铺名称" />
</view>
</view>
<view class="item">
<view class="a">店铺地址</view>
<view class="b">
<input type="text" placeholder="请输入店铺地址" />
<input type="text" v-model="address" placeholder="请输入店铺地址" />
</view>
</view>
<view class="item">
<view class="a">联系方式</view>
<view class="b">
<input type="number" placeholder="请输入手机号" />
<input type="number" v-model="phone" placeholder="请输入手机号" />
</view>
</view>
<view class="items">
<view class="a">微信二维码</view>
<view class="c">
<u-upload :action="action" width="160" height="160" :file-list="fileList" :custom-btn="true" max-count="5">
<u-upload :action="action" :header="header" @on-uploaded="success" @on-remove="removePic" width="180" height="180" :file-list="fileList" :custom-btn="true" max-count="1">
<template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="/static/news/icon-upload.png"></image>
<image :src="$picUrl+'/static/news/icon-upload.png'"></image>
<view class="1">上传图片</view>
</view>
</template>
@ -34,23 +34,139 @@
</view>
</view>
<view class="addressList-fd">
<view class="btn">保存</view>
<view class="btn" @click="toSubmit()">保存</view>
</view>
</view>
</template>
<script>
import Config from '@/core/config'
import * as GoodsApi from '@/api/home/index.js';
export default {
data() {
return {
checked: false,
value: "",
fileList: [
{
url: 'http://pics.sc.chinaz.com/files/pic/pic9/201912/hpic1886.jpg',
}
],
shop_name: "",
address: "",
phone: "",
action: "",
wechat_img_id: "",
fileList: [],
clickFlag: true,
header: {},
shop_id: ""
};
},
onReady() {
this.shop_id = uni.getStorageSync("cityInfo").shop_id;
this.shop_name = uni.getStorageSync("cityInfo").shop_name
this.address = uni.getStorageSync("cityInfo").address
this.phone = uni.getStorageSync("cityInfo").phone
this.wechat_img_id = uni.getStorageSync("cityInfo").wechat;
this.fileList = [{
url: uni.getStorageSync("cityInfo").wechat
}]
console.log(uni.getStorageSync("cityInfo"))
console.log(uni.getStorageSync("cityInfo").parking_name)
this.action = (Config.get('apiUrl')+'upload/image').replace("index.php?s=/","")
this.header = {
'Storeid': uni.getStorageSync('Store').storeInfo.store_id,
'Access-Token': uni.getStorageSync('AccessToken'),
'platform': "MP-WEIXIN",
}
},
methods: {
//
async toSubmit(){
if(!this.shop_name){
uni.showToast({
icon: "none",
title: "门店名称不能为空!"
})
return ;
}
if(!this.address){
uni.showToast({
icon: "none",
title: "门店地址不能为空"
})
return ;
}
if(!this.phone){
uni.showToast({
icon: "none",
title: "手机号不能为空!"
})
return ;
}
if(!/^1[23456789]\d{9}$/.test(this.phone)){
uni.showToast({
icon: "none",
title: "手机格式不正确!"
})
return ;
}
if(!this.wechat_img_id){
uni.showToast({
icon: "none",
title: "请上传微信二维码!"
})
return ;
}
if(this.clickFlag == false){
return ;
}
this.clickFlag = false;
const { status, message } = await GoodsApi.editShop({
shop_id: this.shop_id,
shop_name: this.shop_name,
address: this.address,
phone: this.phone,
wechat_img_id: this.wechat_img_id
});
if(status == 200){
this.clickFlag = true;
uni.showToast({
title: "提交成功"
})
this.getCityInfo();
}else{
this.clickFlag = true
uni.showToast({
icon: "none",
title: message
})
}
},
getCityInfo(){
const that =this
GoodsApi.cityInfo().then(res => {
if (res.status == 200) {
that.cityInfo = res.data;
uni.setStorageSync("cityInfo",res.data)
setTimeout(()=>{
uni.navigateBack({
delta: 1
})
},2000)
}
})
.finally(() => {})
},
removePic(i){
console.log(i)
},
//
success(list) {
if(list.length > 0){
const {response} = list[0];
if(response.status == 200){
uni.showToast({
title: "上传成功"
})
this.wechat_img_id = response.data.fileInfo.file_id
}
}
}
}
}
</script>

@ -23,15 +23,16 @@
</view>
</view>
<view style="display: flex; flex: 1; justify-content: flex-end;">
<view class="group_2" @click="goJump('/pages/news/user/message')">
<view class="group_2">
<image :src="$picUrl+'/static/home/news.png'" class="thumbnail"></image>
<text lines="1" class="text_2">消息</text>
<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">
<view class="group_4" @click="lookMemberCode('2')" v-if="userInfo.user_type == 20">
<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">
<view class="group_5" @click="lookMemberCode('3')" v-if="userInfo.user_type == 30">
<image :src="$picUrl+'/static/user/code.png'" class="thumbnail_3"></image>
<text lines="1" class="text_4">分销码</text>
</view>
@ -234,7 +235,7 @@
</view>
</view>
</view>
<view class="goodsManage" v-if="isLogin == false || userInfo.user_type>= 30">
<view class="goodsManage" v-if="isLogin == false || userInfo.user_type == 30">
<view class="manageTitle">
<text lines="1" class="text_5 titleLeft">分销订单</text>
<text lines="1" class="text_6 titleRight" @click="goJump('/pages/news3/fenxiao')">查看全部</text>
@ -407,7 +408,7 @@
</view>
</view>
<view class="serveIcon" @click="goJump('/pages/news1/help')">
<view class="serveIcon" @click="goJump('/pages/news1/help',1)">
<image :src="$picUrl+'/static/user/help.png'" class="icons"></image>
<view class="serveInfo">
帮助中心
@ -477,14 +478,15 @@
<view class="memberCode" v-if="memberCode" @click="memberCode=false">
<view class="codeMain">
<view class="myCode">
<text v-if="userInfo.user_type==20">我的专属会员识别码</text>
<text v-if="userInfo.user_type==30">我的专属分销识别码</text>
<text v-if="lookMemberType == 2">我的专属会员识别码</text>
<text v-if="lookMemberType == 3">我的专属分销识别码</text>
</view>
<view class="codeImg">
<image src="" mode="" class="img"></image>
<image v-if="lookMemberType == 2" :src="userInfo.qrcode" class="img"></image>
<image v-if="lookMemberType == 3" :src="userInfo.qrcode" class="img"></image>
</view>
<view class="codeName">
SJIHIHOHOOHOH
{{userInfo.user_id}}
</view>
</view>
</view>
@ -496,9 +498,11 @@
} from '@/core/app'
import * as UserApi from '@/api/user';
import * as Api from '@/api/goods'
import { createQrCodeImg } from '@/utils/qrcode'
export default {
data() {
return {
lookMemberType: 2,
isTop: false,
background: {
background: 'url(https://www.royaum.com.cn/static/news/login-bg.png) center top no-repeat',
@ -557,7 +561,10 @@
load: that.isFirstload
})
.then(result => {
that.userInfo = result.data.userInfo
let data = result.data.userInfo
data.qrcode = createQrCodeImg(data.user_id, { 'size': 500 });
console.log(data)
that.userInfo = data
that.getOrderInfo();
that.getActionCountsInfo();
uni.setStorageSync('userInfo', that.userInfo)
@ -627,13 +634,19 @@
url: "/pages/news/recycling/orderList?type=" + type
})
},
goJump(path){
goJump(url,type){
if(type == 1){
uni.navigateTo({
url
})
return ;
}
if(this.isLogin == false){
this.goLogin()
return;
}
uni.navigateTo({
url: path
url
})
},
goLogin() {
@ -665,6 +678,7 @@
this.goLogin()
return;
}
this.lookMemberType = val;
this.memberCode = true;
},
@ -915,6 +929,16 @@
width: 40rpx;
height: 68rpx;
margin: 8rpx 0 0 48rpx;
position: relative;
button{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
opacity: 0;
}
.thumbnail {
width: 30rpx;
height: 30rpx;
@ -965,7 +989,7 @@
text-align: left;
white-space: nowrap;
line-height: 20rpx;
margin-top: 8rpx;
margin-top: 12rpx;
}
.group_5 {
@ -994,17 +1018,19 @@
text-align: left;
white-space: nowrap;
line-height: 20rpx;
margin-top: 8rpx;
margin-top: 12rpx;
}
.plus {
width: 688rpx;
height: 130rpx;
background: linear-gradient(180deg, #FFF0DF 0%, #EFD4B4 100%);
width: 692rpx;
height: 134rpx;
background: url('https://www.royaum.com.cn/static/bg-1.png') center top no-repeat;
background-size: 100% auto;
border-radius: 8rpx;
opacity: 1;
margin: 24rpx auto 92rpx;
margin: 24rpx auto 0;
display: flex;
position: relative;
.plusLeft {
.leftTop {
@ -1041,15 +1067,20 @@
}
.plusLine {
margin: 16rpx 0 0 42rpx;
width: 0rpx;
height: 98rpx;
height: 0;
position: absolute;
width: 98rpx;
left: 240rpx;
opacity: 1;
border: 2rpx solid;
border-image: linear-gradient(90deg, rgba(252, 234, 213, 1), rgba(241, 184, 116, 1), rgba(242, 217, 187, 1)) 2 2;
border: 1px solid;
border-image: linear-gradient(90deg, #fcead5, #f1b874, #f2d9bb) 2 2;
transform: rotate(90deg);
top: 35px;
z-index: 2;
}
.plusRight {
margin-left: 100rpx;
.rightTop {
width: 280rpx;
height: 40rpx;
@ -1769,9 +1800,8 @@
.codeMain {
width: 560rpx;
height: 714rpx;
background: #FFF5E8;
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
background-image: url('https://www.royaum.com.cn/static/bg-2.png');
background-size: 100% 100%;
.myCode {
width: 100%;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 KiB

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save