This commit is contained in:
陈浩 2025-04-21 17:39:41 +08:00
parent c55d02570e
commit b859219268
67 changed files with 5482 additions and 1406 deletions

View File

@ -117,6 +117,7 @@ import { onLoad, onUnload,onNavigationBarButtonTap } from '@dcloudio/uni-app';
import { initChat, logout } from './entry-chat-only.ts'; import { initChat, logout } from './entry-chat-only.ts';
onLoad((options) => { onLoad((options) => {
console.dir(options)
initChat(options); initChat(options);
}); });
@ -136,7 +137,7 @@ const groupID = ref(undefined);
const isGroup = ref(false); const isGroup = ref(false);
const isNotInGroup = ref(false); const isNotInGroup = ref(false);
const notInGroupReason = ref<number>(); const notInGroupReason = ref<number>();
const currentConversationID = ref(); const currentConversationID = ref("");
const isMultipleSelectMode = ref(false); const isMultipleSelectMode = ref(false);
const inputToolbarDisplayType = ref<ToolbarDisplayType>('none'); const inputToolbarDisplayType = ref<ToolbarDisplayType>('none');
const messageInputRef = ref(); const messageInputRef = ref();

View File

@ -19,7 +19,7 @@ export function getRegionsById(id = 0) {
// 获取IM接口前缀 // 获取IM接口前缀
export function getIMDetail() { export function getIMDetail() {
return http.request({ return http.request({
url: `${api.common}/IM`, url: `${api.common}/common/IM`,
method: Method.GET, method: Method.GET,
message: false, message: false,
}); });

View File

@ -118,8 +118,58 @@ export function getCategoryList(id) {
}); });
} }
/**
* 达人申请
* @param parent_id
*/
export function getMon(params) {
return http.request({
url: `/expert/applyExpert`,
method: Method.POST,
loading: false,
data: params,
});
}
// 申请店铺第一步-填写企业信息
export function applyFirst (params) {
return http.request({
url: '/store/store/apply/first',
// needToken: true,
method: Method.PUT,
params
})
}
// 申请店铺第一步-填写企业信息
export function applySecond (params) {
return http.request({
url: '/store/store/apply/second',
needToken: true,
method: Method.PUT,
params
})
}
// 申请店铺第一步-填写企业信息
export function applyThird (params) {
return http.request({
url: '/store/store/apply/third',
needToken: true,
method: Method.PUT,
params
})
}
/**
* 店铺申请
* @param parent_id
*/
export function getMonapplyStore(params) {
return http.request({
url: `/expert/store/applyStore`,
method: Method.POST,
loading: false,
data: params,
});
}
/** /**
* 获取当前会员的分销商信息 可根据分销商信息查询待提现金额以及冻结金额等信息 * 获取当前会员的分销商信息 可根据分销商信息查询待提现金额以及冻结金额等信息

View File

@ -315,6 +315,28 @@ export function getMemberstate(params) {
data:params data:params
}); });
} }
/**
* 获取二维码
*/
export function geterwei(params) {
return http.request({
url: "/member/friend/qrcode",
method: Method.GET,
needToken: true,
data:params
});
}
/**
* 获取二维码解析
*/
export function geterweijki(params) {
return http.request({
url: "/member/friend/parse-post?qrContent="+encodeURIComponent(params),
method: Method.POST,
needToken: true,
// data:
});
}
/** /**
* 获取站内信删除 * 获取站内信删除
*/ */

View File

@ -12,8 +12,28 @@ export function sign() {
needToken: true, needToken: true,
}); });
} }
/**
* 获取推荐码
* @param params
*/
export function mymon() {
return http.request({
url: '/share/code/my',
method: Method.GET,
needToken: true,
});
}
/**
* 绑定推荐码
* @param params
*/
export function inviteCode(data) {
return http.request({
url: '/share/code/bind/'+data,
method: Method.POST,
needToken: true,
});
}
/** /**
* 签到时间获取 * 签到时间获取

View File

@ -58,6 +58,21 @@ export function addToCart(data) {
data, data,
}); });
} }
/**
* 本地购物车生成订单
* @param skuId 产品ID
* @param num 产品的购买数量
* @param cartType 购物车类型默认加入购物车
*/
export function orderaddToCart(data) {
return http.request({
url: "/order/createWithVerification",
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
data,
});
}

View File

@ -18,12 +18,18 @@
border-radius="20" border-radius="20"
class="uimage" class="uimage"
height="200rpx" height="200rpx"
:src="selectedSpecImg ? selectedSpecImg : goodsDetail.thumbnail" :src=" selectedSpecImg ? selectedSpecImg : imgfun(goodsDetail.thumbnail)"
></u-image> ></u-image>
</view> </view>
<view class="goods-skus"> <view class="goods-skus">
<!-- 有活动商品价格 --> <!-- 有活动商品价格 -->
<view class="goods-price" v-if="goodsDetail.promotionPrice && ((isGroup && buyType === 'PINTUAN') || !isGroup)"> <view
class="goods-price"
v-if="
goodsDetail.promotionPrice &&
((isGroup && buyType === 'PINTUAN') || !isGroup)
"
>
<span v-if="goodsDetail.promotionPrice && !pointDetail"> <span v-if="goodsDetail.promotionPrice && !pointDetail">
<span class="goods-price-promotionShow goods-price-bigshow">{{ <span class="goods-price-promotionShow goods-price-bigshow">{{
@ -78,7 +84,9 @@
<!-- 正常逻辑 循环出sku --> <!-- 正常逻辑 循环出sku -->
<view <view
v-if="!parentOrder" v-if="!parentOrder"
:class="{ active: spec_val.value == currentSelceted[specIndex] }" :class="{
active: spec_val.value == currentSelceted[specIndex],
}"
class="skus-view-item" class="skus-view-item"
v-for="(spec_val, spec_index) in spec.values" v-for="(spec_val, spec_index) in spec.values"
:key="spec_index" :key="spec_index"
@ -89,7 +97,9 @@
<!-- 拼团购买仅筛选出当前拼团类型商品 --> <!-- 拼团购买仅筛选出当前拼团类型商品 -->
<view <view
v-if="parentOrder && spec_val.skuId == goodsDetail.id" v-if="parentOrder && spec_val.skuId == goodsDetail.id"
:class="{ active: spec_val.value == currentSelceted[specIndex] }" :class="{
active: spec_val.value == currentSelceted[specIndex],
}"
class="skus-view-item" class="skus-view-item"
v-for="(spec_val, spec_index) in spec.values" v-for="(spec_val, spec_index) in spec.values"
:key="spec_index" :key="spec_index"
@ -118,11 +128,17 @@
<view class="btns"> <view class="btns">
<view <view
class="box-btn card" class="box-btn card"
v-if="buyType != 'PINTUAN' && goodsDetail.goodsType != 'VIRTUAL_GOODS'" v-if="
buyType != 'PINTUAN' &&
goodsDetail.goodsType != 'VIRTUAL_GOODS' &&
ste == 1
"
@click="addToCartOrBuy('cart')" @click="addToCartOrBuy('cart')"
>加入购物车</view >加入购物车</view
> >
<view class="box-btn buy" @click="addToCartOrBuy('buy')">立即购买</view> <view class="box-btn buy" @click="addToCartOrBuy('buy')"
>立即购买</view
>
</view> </view>
</view> </view>
</u-popup> </u-popup>
@ -131,7 +147,7 @@
<script> <script>
import * as API_trade from "@/api/trade.js"; import * as API_trade from "@/api/trade.js";
import setup from "./popup"; import setup from "./popup";
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
export default { export default {
data() { data() {
return { return {
@ -154,8 +170,14 @@ export default {
currentSelceted: [], currentSelceted: [],
skuList: "", skuList: "",
isClose: false, // isClose: false, //
ste: 0,
//
remarkVal: [],
}; };
}, },
created() {
this.ste = uni.getStorageSync("ste");
},
props: { props: {
buyMask: { buyMask: {
type: Boolean, type: Boolean,
@ -255,7 +277,14 @@ export default {
}); });
} }
}, },
/**
* 跳转
*/
navigateTo(url) {
uni.navigateTo({
url,
});
},
/** /**
* 直接购买 * 直接购买
*/ */
@ -284,11 +313,11 @@ export default {
}); });
return; return;
} }
const storedSte = uni.getStorageSync('ste'); const storedSte = uni.getStorageSync("ste");
let data = { let data = {
skuId: this.goodsDetail.id, skuId: this.goodsDetail.id,
num: this.num, num: this.num,
ste:storedSte ste: storedSte,
}; };
if (val == "cart") { if (val == "cart") {
@ -312,13 +341,15 @@ export default {
} else { } else {
data.cartType = "BUY_NOW"; data.cartType = "BUY_NOW";
} }
//
API_trade.addToCart(data).then((res) => { API_trade.addToCart(data).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/order/fillorder?way=${data.cartType}&addr=${ url: `/pages/order/fillorder?way=${data.cartType}&addr=${
this.addr.id || "" this.addr.id || ""
}&parentOrder=${encodeURIComponent(JSON.stringify(this.parentOrder))}`, }&parentOrder=${encodeURIComponent(
JSON.stringify(this.parentOrder)
)}`,
}); });
} }
}); });
@ -329,7 +360,7 @@ export default {
let arr = [{}]; let arr = [{}];
if (!Array.isArray(list)) { if (!Array.isArray(list)) {
return false return false;
} }
list.forEach((item, index) => { list.forEach((item, index) => {
item.specValues.forEach((spec, specIndex) => { item.specValues.forEach((spec, specIndex) => {
@ -402,12 +433,13 @@ export default {
@import "./popup.scss"; @import "./popup.scss";
.buy { .buy {
background-image: linear-gradient(135deg, #ffba0d, #ffc30d 69%, #ffcf0d);
background-color: $aider-light-color ;
box-shadow: 0 2px 6px 0 rgba(255, 65, 66, 0.2); box-shadow: 0 2px 6px 0 rgba(255, 65, 66, 0.2);
} }
.card { .card {
background-image: linear-gradient(135deg, #f2140c, #f2270c 70%, #f24d0c); background-image: linear-gradient(135deg, #ffba0d, #ffc30d 69%, #ffcf0d);
box-shadow: 0 2px 6px 0 rgba(255, 65, 66, 0.2); box-shadow: 0 2px 6px 0 rgba(255, 65, 66, 0.2);
} }

View File

@ -4,7 +4,7 @@
<div class="goods-list"> <div class="goods-list">
<div @click="handleClick(item)" class="goods-item" v-for="(item, item_index) in goodsList" :key="item_index"> <div @click="handleClick(item)" class="goods-item" v-for="(item, item_index) in goodsList" :key="item_index">
<div class="goods-img"> <div class="goods-img">
<u-image :src="item.content.thumbnail" mode="aspectFill" height="350rpx" width="100%"> <u-image :src="imgfun(item.content.thumbnail)" mode="aspectFill" height="350rpx" width="100%">
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
</u-image> </u-image>
</div> </div>

View File

@ -1,7 +1,12 @@
<template> <template>
<!-- 遮罩层 --> <!-- 遮罩层 -->
<u-popup @close="close" v-model="show" mode="bottom" border-radius="30" height="260rpx"> <u-popup
@close="close"
v-model="show"
mode="bottom"
border-radius="30"
height="260rpx"
>
<view class="share-title"> <view class="share-title">
<span>分享至</span> <span>分享至</span>
</view> </view>
@ -14,7 +19,12 @@
</view> </view>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<view class="share-item" @click="handleShare(item)" v-for="(item, index) in list" :key="index"> <view
class="share-item"
@click="handleShare(item)"
v-for="(item, index) in list"
:key="index"
>
<u-icon :color="item.color" size="80" :name="item.icon"></u-icon> <u-icon :color="item.color" size="80" :name="item.icon"></u-icon>
<view>{{ item.title }}</view> <view>{{ item.title }}</view>
</view> </view>
@ -22,7 +32,7 @@
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<view class="share-item" @click="copyLink()"> <view class="share-item" @click="copyLink()">
<u-icon color="#b4aee8" size="80" name="share-fill"></u-icon> <u-icon color="#b4aee8" size="80" name="share-fill"></u-icon>
<view>{{ '复制链接' }}</view> <view>{{ "复制链接" }}</view>
</view> </view>
<!-- #endif --> <!-- #endif -->
</view> </view>
@ -52,12 +62,18 @@ export default {
icon: "weixin-circle-fill", icon: "weixin-circle-fill",
type: 1, type: 1,
}, },
{
color: "#04BE02",
title: "消息",
icon: "weixin-circle-fill",
type: 2,
},
], ],
}; };
}, },
// typegoods,shop,pintuan) // typegoods,shop,pintuan)
props: ["thumbnail", "goodsName", "type", "goodsId", "link"], props: ["thumbnail", "goodsName", "type", "goodsId", "link","price"],
methods: { methods: {
close() { close() {
this.$emit("close"); this.$emit("close");
@ -137,6 +153,39 @@ export default {
}, },
}); });
} }
if (val.type == 2) {
//
// props: ["thumbnail", "goodsName", "type", "goodsId", "link","price"],
// console.log(this.link,'===')
// const mofn=JSON.stringify(':'+this.goodsName+',:'+this.price+','+this.link)
const mofn=this.goodsName+','+this.price+','+this.thumbnail.split('?')[0].split('com')[1]+','+this.link.split('?')[1]
// const mofn={nage:this.goodsName,price:this.price,img:this.thumbnail.split('?')[0],link:this.link}
console.log('===+++',mofn.split(',')[1])
console.log('===+++',this.thumbnail)
console.log('===+++',mofn.split(',')[3])
// uni.setClipboardData({
// data: mofn,
// success: () => {
// uni.showToast({
// title: "",
// icon: "none",
// });
// uni.switchTab({
// url: "/pages/tabbar/im/index",
// fail: (err) => {
// console.error("--:", err); //
// },
// });
// },
// fail: () => {
// uni.showToast({
// title: "",
// });
// },
// });
}
}, },
// #endif // #endif
}, },

View File

@ -7,19 +7,19 @@ const dev = {
// common: "https://common-api.pickmall.cn", // common: "https://common-api.pickmall.cn",
// buyer: "https://buyer-api.pickmall.cn", // buyer: "https://buyer-api.pickmall.cn",
common: "http://192.168.1.200:8890", common: "http://192.168.1.211:8890",
buyer: "http://192.168.1.200:8888", buyer: "http://192.168.1.211:8888",
vlog: "http://192.168.1.200:8099", vlog: "http://192.168.1.211:8099",
web: "http://192.168.1.200:8099", web: "http://192.168.1.211:8099",
}; };
// 生产环境 // 生产环境
const prod = { const prod = {
// common: "https://common-api.pickmall.cn", // common: "https://common-api.pickmall.cn",
// buyer: "https://buyer-api.pickmall.cn", // buyer: "https://buyer-api.pickmall.cn",
common: "http://192.168.1.200:8890", common: "http://192.168.1.211:8890",
buyer: "http://192.168.1.200:8888", buyer: "http://192.168.1.211:8888",
vlog: "http://192.168.1.200:8099", vlog: "http://192.168.1.211:8099",
}; };
//默认生产环境 //默认生产环境

View File

@ -12,5 +12,6 @@ export default {
iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看 iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址 logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址
customerServiceMobile:"13161366885", //客服电话 customerServiceMobile:"13161366885", //客服电话
customerServiceEmail:"lili@lili.com" //客服邮箱 customerServiceEmail:"lili@lili.com", //客服邮箱
img:'https://wzjbucket.oss-rg-china-mainland.aliyuncs.com', //图片地址,聊天分享的图片地址
}; };

View File

@ -51,3 +51,8 @@ const app = new Vue({
...App, ...App,
}); });
app.$mount(); app.$mount();
// 全局方法 imgfun
Vue.prototype.imgfun = function(val) {
return val.split("?")[0];
};

View File

@ -20,7 +20,8 @@
"navigationBarTitleText": "商城", "navigationBarTitleText": "商城",
"navigationStyle": "custom", // "navigationStyle": "custom", //
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"enablePullDownRefresh": true "enablePullDownRefresh": true,
"onReachBottomDistance": 50
} }
}, },
@ -551,7 +552,54 @@
{ {
"root": "pages/mine", "root": "pages/mine",
"pages": [ "pages": [
{
"path": "mydistribution/index",
"style": {
"navigationBarTitleText": "我的分销"
}
},
{
"path": "makeMoney/index",
"style": {
"navigationBarTitleText": "赚钱"
}
},
{
"path": "invite",
"style": {
"navigationBarTitleText": "我的推荐"
}
},
{
"path": "inviteinput",
"style": {
"navigationBarTitleText": "输入邀请码"
}
},
{
"path": "expert/index",
"style": {
"navigationBarTitleText": "达人申请"
}
},
{
"path": "openShop/index",
"style": {
"navigationBarTitleText": "店铺申请"
}
},
{
"path": "openShop/secon",
"style": {
"navigationBarTitleText": "店铺申请"
}
},
{
"path": "openShop/ThirdApply",
"style": {
"navigationBarTitleText": "店铺申请"
}
},
{ {
"path": "signIn", "path": "signIn",
"style": { "style": {
@ -851,6 +899,24 @@
} }
} }
}, },
{
"path": "vengoods",
"style": {
"backgroundColor": "#fff",
"navigationStyle": "custom",
"app-plus": {
//
"bounce": "none",
//
"scrollIndicator": "none",
"safearea": {
"bottom": {
"offset": "none"
}
}
}
}
},
{ {
"path": "askList", "path": "askList",
"style": { "style": {

View File

@ -149,7 +149,6 @@
parms.sn = this.sn; parms.sn = this.sn;
parms.orderType = this.orderType; parms.orderType = this.orderType;
parms.clientType = this.paymentType; parms.clientType = this.paymentType;
API_Trade.getCashierData(parms).then((res) => { API_Trade.getCashierData(parms).then((res) => {
if(res.data.success){ if(res.data.success){

333
pages/mine/expert/index.vue Normal file
View File

@ -0,0 +1,333 @@
<template>
<view style="padding: 10px">
<u-form :model="form" ref="uForm" :rules="rules">
<u-form-item label="姓名"
><u-input v-model="form.name" placeholder="请输入您真实姓名"
/></u-form-item>
<u-form-item label="性别">
<u-radio-group v-model="form.sex" style="margin-left: 30px">
<u-radio
v-for="(item, index) in radioList"
:key="index"
:name="item.value"
:value="item.value"
:disabled="item.disabled"
>
{{ item.name }}
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item label="联系方式"
><u-input v-model="form.contact" placeholder="请输入"
/></u-form-item>
<u-form-item label="店铺地址"
><u-input v-model="form.residenceAddress" placeholder="请输入"
/></u-form-item>
<u-form-item label="营业执照">
<u-upload
:action="action"
:header="{ accessToken: storage.getAccessToken() }"
max-count="1"
style="margin-left: 30px"
@on-uploaded="onUploaded"
></u-upload>
<!-- <u-input v-model="form.businessLicense" placeholder="请输入"/> -->
</u-form-item>
<u-form-item label="证件类别"
><u-input v-model="idType" type="select" @click="show = true" />
<u-action-sheet
:list="actionSheetList"
v-model="show"
@click="actionSheetCallback"
></u-action-sheet>
</u-form-item>
<u-form-item label="证件照片">
<u-upload
:header="{ accessToken: storage.getAccessToken() }"
max-count="2"
:action="action"
@on-uploaded="onUploadedtwo"
style="margin-left: 30px"
></u-upload>
</u-form-item>
<u-form-item label="证件有效期" right-icon="arrow-right">
<u-input
v-model="form.idExpiryDate"
placeholder="请输入"
@click="showtime = true"
/>
<u-calendar
v-model="showtime"
mode="date"
@change="changetime"
max-date="30000"
></u-calendar>
</u-form-item>
<u-form-item label="经营范围">
<u-checkbox-group
@change="checkboxGroupChange"
style="margin-left: 30px"
>
<u-checkbox
v-model="item.checked"
v-for="(item, index) in cateList"
:key="index"
:name="item.id"
>{{ item.name }}</u-checkbox
>
</u-checkbox-group>
</u-form-item>
</u-form>
<button @click="consub" :style="{ background: '#FE3C3C' }"
class="bunem">提交</button>
<u-toast ref="uToast" />
</view>
</template>
<script>
import storage from "@/utils/storage.js";
import { upload } from "@/api/common.js";
import { getCategoryList, getMon } from "@/api/goods.js";
export default {
data() {
return {
action: upload,
storage: storage,
form: {
name: "",
sex: "",
contact: "",
residenceAddress: "",
businessLicense: "",
idType: "",
idPhoto: [],
idExpiryDate: "",
businessAddress: "",
businessScope: "",
},
rules: {
name: [
{
required: true,
message: "姓名不能为空",
trigger: "blur",
},
],
sex: [
{
required: true,
message: "性别不能为空",
trigger: "change",
},
],
contact: [
{
required: true,
message: "联系方式不能为空",
trigger: "blur",
},
],
residenceAddress: [
{
required: true,
message: "居住地址不能为空",
trigger: "blur",
},
],
businessLicense: [
{
required: true,
message: "营业执照不能为空",
trigger: "change",
},
],
idType: [
{
required: true,
message: "证件类别不能为空",
trigger: "change",
},
],
idPhoto: [
{
required: true,
message: "证件照片不能为空",
trigger: "change",
},
],
idExpiryDate: [
{
required: true,
message: "证件有效期不能为空",
trigger: "change",
},
],
businessAddress: [
{
required: true,
message: "经营范围不能为空",
trigger: "change",
},
],
},
idType: "",
radioList: [
{
name: "男",
disabled: false,
value: "MALE",
},
{
name: "女",
disabled: false,
value: "FEMALE",
},
],
showtime: false, // u-calendar
show: false, // actionSheet--
//
actionSheetList: [
{
text: "身份证",
value: "ID",
},
{
text: "护照",
value: "PASSPORT",
},
{
text: "其他",
value: "OTHER",
},
],
radio: "",
switchVal: false,
cateList: [],
};
},
onLoad() {
//
},
onShow() {
//
},
mounted() {
this.getCategoryList(); //
},
methods: {
//actionSheet--
actionSheetCallback(index) {
this.form.idType = this.actionSheetList[index].value;
this.idType = this.actionSheetList[index].text;
},
consub() {
const {
name,
sex,
contact,
residenceAddress,
businessLicense,
idType,
idPhoto,
idExpiryDate,
businessAddress,
businessScope,
} = this.form;
if (
name == "" ||
sex == "" ||
contact == "" ||
residenceAddress == "" ||
businessLicense.length == 0 ||
idType == "" ||
idPhoto.length == 0 ||
idExpiryDate == "" ||
businessScope.length == 0
) {
this.$refs.uToast.show({
title: "不能为空",
type: "error",
});
} else {
this.form.businessAddress = this.form.residenceAddress;
getMon(this.form).then((res) => {
if (res.data.code == 200) {
this.$refs.uToast.show({
title: "提交成功",
type: "success",
});
setTimeout(() => {
uni.switchTab({
url: "/pages/tabbar/user/my",
});
}, 1000);
}
});
}
},
onUploaded(lists) {
console.log(lists); //
lists.forEach((item) => {
this.form.businessLicense = item.response.result;
});
},
onUploadedtwo(lists) {
let images = [];
lists.forEach((item) => {
images.push(item.response.result);
});
this.form.idPhoto = images;
},
changetime(value) {
console.log(value); //
this.form.idExpiryDate = value.result; // form.idExpiryDate
},
// checkbox
checkboxChange(e) {
console.log(e, "[====]");
},
// checkboxcheckbox-group
checkboxGroupChange(e) {
this.form.businessScope = e;
},
getCategoryList() {
getCategoryList(0).then((res) => {
res.data.result.forEach((item) => {
item.checked = false; // checkedfalse
});
this.cateList = res.data.result;
});
},
},
};
</script>
<style lang="scss" scoped>
::v-deep {
.u-form-item--left__content {
width: 100px;
white-space: nowrap;
}
.u-input {
margin-left: 30px; //
}
.u-checkbox__icon-wrap--checked{
border-color: #fe3c3c !important;
background-color: #fe3c3c !important;
}
}
.bunem {
width: 309px;
margin-top: 20px;
height: 41px;
font-size: 15px;
line-height: 41px;
text-align: center;
color: #ffffff;
margin-bottom: 35px;
}
</style>

149
pages/mine/invite.vue Normal file
View File

@ -0,0 +1,149 @@
<template>
<div class="sigin">
<div class="tui">
<div class="cnent">
<!-- <div><img :src="ImageUrl" alt="" width="60" class="round-avatar"></div> -->
<div class="tuijianm">
<div :style="{ fontsize: '24px' }">您的专属推荐码</div>
<div :style="{ marginTop: '10px' }">{{ resfn }}</div>
</div>
<div class="qian">
<h3>奖励说明:</h3>
<div>将邀请码分享给他人绑定成功且参与开店获得更多奖励</div>
</div>
<button class="btn" @click="share">分享</button>
</div>
</div>
<div class="bottomc">
<!-- <button class="btn">立即推荐</button>
<button class="btn">保存海报</button> -->
</div>
</div>
</template>
<script>
import { mymon } from "@/api/point.js";
// import { saveImageToPhotosAlbum } from "@/utils/request.js"; // request.js
import config from "@/config/config.js"; // config.js API
export default {
data() {
return {
resfn: "",
ImageUrl: "",
};
},
mounted() {
this.getmy();
},
methods: {
getmy() {
mymon().then((res) => {
this.resfn = res.data.result.code;
// this.ImageUrl= res.data.result.face;
});
},
share() {
console.log(config.downloadLink);
//
uni.showActionSheet({
itemList: ['分享到微信好友', '分享到朋友圈', '分享到QQ', '分享到消息'],
success: (res) => {
const providerMap = ['weixin', 'weixin', 'qq', 'im'];
const sceneMap = ['WXSceneSession', 'WXSceneTimeline', '', ''];
// QQ ------------
if (providerMap[res.tapIndex] === 'im') {
uni.setClipboardData({
data:`邀请码:${this.resfn}`,
success: () => {
uni.showToast({
title: "复制成功",
icon: "none"
});
uni.switchTab({
url: "/pages/tabbar/im/index",
});
},
fail: () => {
uni.showToast({
title: "复制失败",
icon: "none"
});
}
});
} else {
uni.share({
provider: providerMap[res.tapIndex],
scene: sceneMap[res.tapIndex],
title: '无终街邀请专属码',
summary: '输入达人邀请码,获得更多曝光量',
imageUrl: '/static/imlogo.png',
href:config.downloadLink,
success: () => uni.showToast({ title: '分享成功' })
});
}
}
});
},
},
};
</script>
<style lang="scss" scoped>
.sigin {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: url("@/static/abcx.png") no-repeat;
background-size: 100% 100%;
}
.tui {
padding: 0px;
height: calc(85vh - 65px);
width: 80%;
margin: 10px;
border-radius: 10px;
}
.cnent {
height: 80%;
display: flex;
flex-direction: column;
align-items: center;
}
.round-avatar {
border-radius: 50%;
object-fit: cover; /* 确保图片填充整个圆形区域 */
width: 60px;
height: 60px;
}
.bottomc {
width: 80%;
height: 15vh;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.qian {
width: 80%;
margin-top: 50px;
}
.btn {
width: 75%;
background: #fe3c3c;
margin-top: 56px;
}
.tuijianm {
width: 65%;
height: 5.3vh;
font-size: 20px;
justify-content: center;
align-items: center;
padding: 10px;
margin-top: 24vh;
text-align: center;
}
</style>

View File

@ -0,0 +1,91 @@
<template>
<div class="sigin">
<div class="cal">输入邀请码获取特定礼包</div>
<div class="si_input">
<u-input
v-model="inviteCode"
type="text"
aria-placeholder="
请输入推荐码"
/>
</div>
<div class="si_bottom">
<button class="btn" @click="head">绑定推荐码</button>
</div>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { inviteCode } from "@/api/point.js";
export default {
data() {
return {
resfn: "",
ImageUrl: "",
inviteCode: "",
};
},
mounted() {
// this.getmy();
},
methods: {
head() {
if (this.inviteCode == "") {
this.$refs.uToast.show({
title: "请输入邀请码",
type: "error",
});
} else {
inviteCode(this.inviteCode).then((res) => {
console.log(res);
if (res.data.code == 200) {
this.$refs.uToast.show({
title: "绑定成功",
type: "success",
});
// this.$message.success('');
// this.$router.push({ path: "/home" });
} else {
this.$message.error(res.data.message);
this.$refs.uToast.show({
title: res.data.message,
type: "error",
});
}
});
}
// return false;
},
},
};
</script>
<style lang="scss" scoped>
.sigin {
width: 100%;
height: 25vh;
display: flex;
flex-direction: column;
justify-content: space-evenly;
}
.si_input {
width: 70%;
margin: 0 auto;
text-align: center;
}
.si_bottom {
width: 70%;
margin: 0 auto;
text-align: center;
}
.cal {
width: 70%;
margin: 0 auto;
text-align: center;
font-size: 20px;
}
.btn {
background: #fe3c3c;
}
</style>

View File

View File

@ -0,0 +1,30 @@
<template>
<view class="content">
84654
</view>
</template>
<script>
import { getPointsData } from "@/api/members.js";
import { getMemberPointSum } from "@/api/members.js";
export default {
data() {
return {
};
},
onLoad() {
},
methods: {
},
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -16,7 +16,7 @@
@change="changeChecked(item)"></u-checkbox> @change="changeChecked(item)"></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
<view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)"> <view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)">
<image :src="item.thumbnail"></image> <image :src="imgfun(item.thumbnail)"></image>
</view> </view>
<view class="myTracks-item-content" @click.stop="navgaiteToDetail(item)"> <view class="myTracks-item-content" @click.stop="navgaiteToDetail(item)">
<view class="myTracks-item-title"> <view class="myTracks-item-title">

View File

@ -0,0 +1,269 @@
<template>
<div class="distribution-container">
<!-- Header section -->
<div class="distribution-header">
<div class="total-earnings">
<div class="total">
<h2 :style="{ fontSize: '15px' }">总收益()</h2>
<h2 :style="{ fontSize: '15px' }" @click="show = true">
<u-icon name="question-circle" color="#fff" size="28"></u-icon>
提现规则
</h2>
</div>
<p class="amount" :style="{ fontSize: '30px' }">1164</p>
</div>
<div class="hr"></div>
<div class="withdrawable" :style="{ padding: '10px 0px' }">
<div class="itox">可提现金额<span class="amount">94.26</span></div>
<div class="buto" @click="goToDepositPage">提现</div>
</div>
</div>
<!-- Main content card -->
<div class="distribution-card">
<!-- Stats grid -->
<div class="stats-grid">
<h2>当月数据</h2>
<div class="stats-row">
<div class="stat-item">
<div class="stat-value">197</div>
<div class="stat-label">我的邀请</div>
</div>
<div class="stat-item">
<div class="stat-value">100.00</div>
<div class="stat-label">现金奖励</div>
</div>
<div class="stat-item">
<div class="stat-value">200.00</div>
<div class="stat-label">待入账</div>
</div>
</div>
</div>
</div>
<!-- 新增的菜单列表 -->
<div class="menu-list">
<div class="menu-item" v-for="(item, index) in menuItems" :key="index" @click="touni(item.url)">
<div class="menu-text">{{ item.name }}</div>
<u-icon name="arrow-right" color="#999" size="16"></u-icon>
</div>
</div>
<!-- Withdrawal Rules Popup -->
<u-popup
v-model="show"
mode="right"
border-radius="14"
width="500rpx"
height="100%"
>
<view class="rules-popup">
<div class="rules-header">
<h1>提现规则</h1>
</div>
<div class="rules-content">
<ol class="rules-list">
<li class="rule-item">
每次可提现10%的现金额度到余额账户手续费从提现金额里扣除8%
</li>
<li class="rule-item">提现后87天内到账</li>
<li class="rule-item">每个用户同时只能发起1笔提现订单</li>
</ol>
</div>
</view>
</u-popup>
</div>
</template>
<script>
export default {
name: "MyDistribution",
data() {
return {
show: false,
menuItems: [
{name:"我的用户",url:''},
{name:"消费记录",url:''},
{name:"收益明细",url:''},
{name:"提现记录",url:''},
{name:"我的邀请码",url:'/pages/mine/invite'},
]
};
},
methods: {
touni(e){
uni.navigateTo({ url:e });
},
goToDepositPage() {
uni.navigateTo({ url: '/pages/mine/deposit/operation' });
}
},
};
</script>
<style lang="scss" scoped>
.menu-list {
background-color: white;
border-radius: 8px;
margin: 15px;
padding: 0 15px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
.menu-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 0;
border-bottom: 1px solid #f5f5f5;
&:last-child {
border-bottom: none;
}
.menu-text {
font-size: 15px;
color: #333;
}
.u-icon {
margin-left: 10px;
}
}
}
.hr {
width: 100%;
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 50%;
}
.distribution-container {
font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
width: 100%;
color: #333;
.distribution-header {
background-color: #ff7d00;
color: white;
padding: 25px 20px;
.total-earnings {
margin-bottom: 15px;
.total {
display: flex;
justify-content: space-between;
align-items: center;
}
}
.withdrawable {
font-size: 14px;
display: flex;
justify-content: space-between;
align-items: center;
.buto {
padding: 4px 12px;
border: 1px solid #fff;
border-radius: 4px;
font-size: 14px;
}
.itox {
display: flex;
align-items: center;
.amount {
color: #fff;
font-weight: bold;
margin-left: 4px;
}
}
}
}
.distribution-card {
background-color: white;
border-radius: 8px;
margin: -25px 15px 20px;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: relative;
z-index: 1;
h2 {
font-size: 16px;
margin: 0 0 15px 0;
font-weight: 600;
}
.stats-grid {
h2 {
margin-bottom: 10px;
}
.stats-row {
display: flex;
justify-content: space-between;
.stat-item {
flex: 1;
text-align: center;
.stat-value {
font-size: 18px;
font-weight: bold;
margin-bottom: 5px;
}
.stat-label {
font-size: 12px;
color: #666;
}
}
}
}
}
/* Withdrawal Rules Popup Styles */
.rules-popup {
height: 100%;
display: flex;
flex-direction: column;
background-color: #ff7d00;
.rules-header {
color: white;
padding: 15px 20px;
h1 {
margin: 0;
font-size: 18px;
font-weight: 600;
}
}
.rules-content {
background-color: #ff7d00;
flex: 1;
color: white;
padding: 20px;
// background-color: #fff;
overflow-y: auto;
.rules-list {
padding-left: 20px;
margin: 0;
.rule-item {
margin-bottom: 15px;
font-size: 14px;
line-height: 1.5;
// color: #333;
&:last-child {
margin-bottom: 0;
}
}
}
}
}
}
</style>

View File

@ -0,0 +1,323 @@
<template>
<div class="person-msg">
<u-form ref="thirdForm" :model="form" :rules="rules" :label-width="200">
<h4>基础信息</h4>
<u-form-item prop="storeName" label="店铺名称">
<u-input
type="text"
v-model="form.storeName"
placeholder="请填写店铺名称"
/>
</u-form-item>
<u-form-item prop="storeLogo" label="店铺logo">
<!-- <Upload
ref="uploadLogo"
:show-upload-list="false"
:on-success="handleSuccess"
:format="['jpg', 'jpeg', 'png', 'gif']"
:max-size="2048"
:before-upload="beforeUpload"
:on-format-error="handleFormatError"
:on-exceeded-size="handleMaxSize"
:on-error="uploadErr"
multiple
:action="action"
:headers="accessToken"
>
<Button type="info" :loading="uploadLoading">上传logo</Button>
</Upload> -->
<u-upload
:header="{ accessToken: storage.getAccessToken() }"
max-count="1"
:action="action"
@on-uploaded="onUploadedtwo"
style="margin-left: 30px"
></u-upload>
<div class="describe">请压缩图片在2M以内格式为gifjpgpng</div>
</u-form-item>
<u-form-item prop="goodsManagementCategory" label="店铺经营类目">
<u-checkbox-group
@change="checkboxGroupChange"
style="margin-left: 30px"
>
<u-checkbox
v-model="item.checked"
v-for="(item, index) in cateList"
:key="index"
:name="item.id"
>{{ item.name }}</u-checkbox
>
</u-checkbox-group>
</u-form-item>
<u-form-item prop="storeCenter" label="店铺所在地">
<u-input
v-model="form.___path"
type="select"
@click="showPicker"
placeholder="请选择所在地区"
/>
</u-form-item>
<u-form-item prop="storeAddressDetail" label="店铺详细地址">
<u-input
type="text"
v-model="form.storeAddressDetail"
placeholder="请填写店铺详细地址"
/>
</u-form-item>
<u-form-item prop="storeDesc" label="店铺简介">
<u-input
type="textarea"
v-model="form.storeDesc"
maxlength="200"
show-word-limit
:rows="4"
placeholder="请输入店铺简介"
/>
</u-form-item>
<u-form-item>
<!-- <button @click="uni.navigateBack()" :style="{background:'#F50505'}">返回</button> -->
<button
type="primary"
:style="{ background: '#FE3C3C' }"
@click="next"
class="bunem"
>
提交平台审核
</button>
</u-form-item>
</u-form>
<!-- <Modal title="View Image" v-model="visible">
<img :src="previewPicture" v-if="visible" style="width: 100%" />
</Modal> -->
<!-- <lili-map ref="liliMap" @getAddress="getAddress" :useApi="false"></lili-map> -->
<m-city
:provinceData="list"
headTitle="区域选择"
ref="cityPicker"
@funcValue="getpickerParentValue"
pickerSize="4"
></m-city>
<u-toast ref="uToast" />
</div>
</template>
<script>
import storage from "@/utils/storage.js";
import { upload } from "@/api/common.js";
import { applyThird } from "@/api/goods";
import gkcity from "@/components/m-city/m-city.vue";
import { getCategoryList, getMon } from "@/api/goods.js";
export default {
components: {
"m-city": gkcity,
},
data() {
return {
cateList: [],
list: [
{
id: "",
localName: "请选择",
children: [],
},
],
storage: storage,
loading: false, //
uploadLoading: false, //
action: upload, //
accessToken: {}, // token
previewPicture: "", //
address: "", //
visible: false, //
form: {
//
storeLogo: [],
},
rules: {
//
goodsManagementCategory: [
{ required: true, message: "请选择店铺经营类目" },
],
storeName: [{ required: true, message: "请填写店铺名称" }],
storeLogo: [{ required: true, message: "请上传店铺logo" }],
storeDesc: [{ required: true, message: "请填写店铺简介" }],
storeCenter: [{ required: true, message: "请选择店铺位置" }],
storeAddressIdPath: [{ required: true, message: "请选择店铺位置" }],
storeAddressDetail: [{ required: true, message: "请输入店铺详细地址" }],
},
categoryList: [], //
};
},
methods: {
checkboxGroupChange(e) {
this.form.goodsManagementCategory = e;
this.form.goodsManagementCategory =
this.form.goodsManagementCategory.join(",");
console.log(this.form);
},
getCategoryList() {
getCategoryList(0).then((res) => {
res.data.result.forEach((item) => {
item.checked = false; // checkedfalse
});
this.cateList = res.data.result;
});
},
showPicker() {
this.$refs.cityPicker.show();
},
//
getpickerParentValue(e) {
//
this.form.storeAddressIdPath = [];
this.form.storeAddressPath = [];
let name = "";
e.forEach((item, index) => {
if (item.id) {
//
this.form.storeAddressIdPath.push(item.id);
this.form.storeAddressPath.push(item.localName);
name += item.localName;
this.form.___path = name;
}
if (index == e.length - 1) {
//
let _town = item.children.filter((_child) => {
return _child.id == item.id;
});
this.$set(
this.form,
"storeCenter",
_town[0].center.split(",")[0] + "," + _town[0].center.split(",")[1]
);
this.form.storeAddressIdPath = this.form.storeAddressIdPath.join(",");
this.form.storeAddressPath = this.form.storeAddressPath.join(",");
}
});
console.log(this.form);
},
// logo
onUploadedtwo(lists) {
lists.forEach((item) => {
this.form.storeLogo.push(item.response.result);
});
},
//
next() {
this.$refs.thirdForm.validate((valid) => {
if (valid) {
this.loading = true;
let params = JSON.parse(JSON.stringify(this.form));
params.storeLogo = this.form.storeLogo.toString();
params.goodsManagementCategory =
this.form.goodsManagementCategory.toString();
applyThird(params)
.then((res) => {
this.loading = false;
uni.showToast({
title: "请正确输入",
icon: "none",
duration: 1500,
});
setTimeout(() => {
uni.switchTab({
url: "/pages/tabbar/user/my",
});
}, 1000);
})
.catch(() => {
uni.showToast({
title: "请正确输入",
icon: "none",
duration: 1500,
});
this.loading = false;
});
} else {
uni.showToast({
title: "请正确输入",
icon: "none",
duration: 1500,
});
console.log("error");
}
});
},
},
mounted() {
this.getCategoryList();
},
};
</script>
<style lang="scss" scoped>
.person-msg {
padding: 10px;
}
h4 {
margin-bottom: 10px;
padding: 0 10px;
border: 1px solid #ddd;
background-color: #f8f8f8;
font-weight: bold;
color: #333;
font-size: 14px;
line-height: 40px;
text-align: left;
}
.ivu-input-wrapper {
width: 300px;
}
.img-list {
display: inline-block;
margin: 10px;
width: 100px;
height: auto;
position: relative;
.cover {
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
width: inherit;
height: inherit;
align-items: center;
justify-content: space-around;
i {
color: #fff;
font-size: 30px;
cursor: pointer;
}
}
&:hover .cover {
display: flex;
}
}
.describe {
font-size: 12px;
color: #999;
}
.bunem {
width: 309px;
margin-top: 50px;
height: 41px;
font-size: 15px;
line-height: 41px;
text-align: center;
color: #ffffff;
}
::v-deep {
.u-checkbox__icon-wrap--checked {
border-color: #fe3c3c !important;
background-color: #fe3c3c !important;
}
}
</style>

View File

@ -0,0 +1,431 @@
<template>
<view style="padding: 10px">
<u-form :model="form" ref="firstForm" :rules="rules">
<h4>企业资质信息</h4>
<u-form-item prop="companyName" label="公司名称">
<u-input v-model="form.companyName" placeholder="请填写公司信息" />
</u-form-item>
<u-form-item prop="companyAddressIdPath" label="公司所在地">
<u-input
v-model="path"
type="select"
@click="showPicker"
placeholder="请选择所在地区"
/>
</u-form-item>
<u-form-item prop="companyAddress" label="详细地址">
<u-input
v-model="form.companyAddress"
placeholder="请填写公司详细信息"
/>
</u-form-item>
<u-form-item prop="employeeNum" label="员工总数">
<u-input v-model="form.employeeNum" placeholder="请填写公司员工总数"
><span slot="append"></span>
</u-input>
</u-form-item>
<u-form-item prop="companyPhone" label="公司电话">
<u-input
v-model="form.companyPhone"
placeholder="请填写公司电话"
></u-input>
</u-form-item>
<u-form-item prop="registeredCapital" label="注册资金">
<u-input
v-model="form.registeredCapital"
placeholder="请填写注册资金(万元)"
>
<!-- <span slot="append">万元</span> -->
</u-input>
</u-form-item>
<u-form-item prop="linkName" label="联系人姓名">
<u-input v-model="form.linkName" placeholder="请填写联系人姓名" />
</u-form-item>
<u-form-item prop="linkPhone" label="联系人电话">
<u-input v-model="form.linkPhone" placeholder="请填写联系人电话" />
</u-form-item>
<u-form-item prop="companyEmail" label="电子邮箱">
<u-input v-model="form.companyEmail" placeholder="请填写电子邮箱" />
</u-form-item>
<h4>营业执照信息</h4>
<u-form-item prop="licenseNum" label="营业执照号">
<u-input v-model="form.licenseNum" placeholder="请填写营业执照号" />
</u-form-item>
<u-form-item prop="scope" label="经营范围">
<u-input
type="textarea"
v-model="form.scope"
maxlength="200"
show-word-limit
:rows="4"
placeholder="请输入营业执照所示经营范围"
/>
</u-form-item>
<u-form-item prop="licencePhoto" label="营业执照电子版">
<u-upload
:action="action"
:header="{ accessToken: storage.getAccessToken() }"
max-count="1"
style="margin-left: 70px"
@on-uploaded="onUploadedone"
></u-upload>
</u-form-item>
<h4>法人信息</h4>
<u-form-item prop="legalName" label="法人姓名">
<u-input
v-model="form.legalName"
maxlength="20"
placeholder="请输入法人姓名"
/>
</u-form-item>
<u-form-item prop="legalId" label="法人证件号">
<u-input v-model="form.legalId" placeholder="请输入法人证件号" />
</u-form-item>
<u-form-item prop="legalPhoto" label="法人证件电子版">
<u-upload
:header="{ accessToken: storage.getAccessToken() }"
max-count="2"
:action="action"
@on-uploaded="onUploadedtwo"
style="margin-left: 70px"
></u-upload>
<div class="describe">
请压缩图片在2M以内身份证正反面两张照片确保图片清晰无缺角
</div>
</u-form-item>
<u-form-item> </u-form-item>
</u-form>
<button
type="primary"
@click="next"
:style="{ background: '#FE3C3C' }"
class="bunem"
>
填写财务资质信息
</button>
<u-toast ref="uToast" />
<m-city
:provinceData="list"
headTitle="区域选择"
ref="cityPicker"
@funcValue="getpickerParentValue"
pickerSize="4"
>
</m-city>
</view>
</template>
<script>
import storage from "@/utils/storage.js";
import { upload } from "@/api/common.js";
import gkcity from "@/components/m-city/m-city.vue";
import { applyFirst } from "@/api/goods";
import * as RegExp from "@/plugins/Reg/RegExp.js";
export default {
components: {
"m-city": gkcity,
},
data() {
return {
list: [
{
id: "",
localName: "请选择",
children: [],
},
],
action: upload,
storage: storage,
path: "",
form: {
legalPhoto: [],
licencePhoto: [],
legalId: "",
legalName: "",
companyName: "",
// companyAddressIdPath: "",
companyAddress: "",
employeeNum: "",
registeredCapital: "",
companyAddressPath: "",
linkName: "",
},
rules: {
companyName: [
{
required: true,
message: "请填写公司信息",
trigger: ["blur", "change"],
},
],
companyAddressIdPath: [
{
required: true,
message: "请选择公司所在地",
trigger: ["change"],
},
],
companyAddress: [
{
required: true,
message: "请填写公司详细地址",
trigger: ["blur", "change"],
},
],
employeeNum: [
{
required: true,
message: "请填写公司员工总数",
trigger: ["blur", "change"],
},
{
pattern: RegExp.integer,
message: "只能填写正整数",
trigger: ["blur", "change"],
},
],
registeredCapital: [
{
required: true,
message: "请填写公司注册资金",
trigger: ["blur", "change"],
},
{
pattern: RegExp.integer,
message: "只能填写正整数",
trigger: ["blur", "change"],
},
],
linkName: [
{
required: true,
message: "请填写联系人姓名",
trigger: ["blur", "change"],
},
],
linkPhone: [
{
required: true,
message: "请填写联系人电话",
trigger: ["blur", "change"],
},
{
pattern: RegExp.mobile,
message: "请填写正确的号码",
trigger: ["blur", "change"],
},
],
companyPhone: [
{
required: true,
message: "请填写公司电话",
trigger: ["blur", "change"],
},
{
pattern: RegExp.TEL,
message: "请填写正确的号码",
trigger: ["blur", "change"],
},
],
companyEmail: [
{
required: true,
message: "请填写电子邮箱",
trigger: ["blur", "change"],
},
{
type: "email",
message: "请输入正确的邮箱",
trigger: ["blur", "change"],
},
],
licenseNum: [
{
required: true,
message: "请填写营业执照号",
trigger: ["blur", "change"],
},
{
pattern: RegExp.licenseNum,
message: "请输入正确的营业执照号",
trigger: ["blur", "change"],
},
],
scope: [
{
required: true,
message: "请填写营业执照所示经营范围",
trigger: ["blur", "change"],
},
],
legalPhoto: [
{
required: true,
message: "请上传法人身份证照片",
trigger: ["change"],
},
],
licencePhoto: [
{
required: true,
message: "请上传营业执照",
trigger: ["change"],
},
],
legalName: [
{
required: true,
message: "请输入法人姓名",
trigger: ["blur", "change"],
},
],
legalId: [
{
required: true,
message: "请输入法人证件号",
trigger: ["blur", "change"],
},
{
pattern: RegExp.IDCard,
message: "请输入正确的证件号",
trigger: ["blur", "change"],
},
],
},
};
},
onLoad() {
//
},
onShow() {
//
},
mounted() {},
methods: {
//
showPicker() {
this.$refs.cityPicker.show();
},
//
getpickerParentValue(e) {
//
this.form.consigneeAddressIdPath = [];
this.form.consigneeAddressPath = [];
let name = "";
e.forEach((item, index) => {
if (item.id) {
//
this.form.consigneeAddressIdPath.push(item.id);
this.form.consigneeAddressPath.push(item.localName);
name += item.localName;
this.form.companyAddressPath = name;
this.path = name;
}
if (index == e.length - 1) {
//
let _town = item.children.filter((_child) => {
return _child.id == item.id;
});
this.form.lat = _town[0].center.split(",")[1];
this.form.lon = _town[0].center.split(",")[0];
}
});
},
consub() {},
onUploaded(lists) {
lists.forEach((item) => {
this.form.businessLicense = item.response.result;
});
},
//
onUploadedone(lists) {
lists.forEach((item) => {
this.form.licencePhoto = item.response.result;
});
},
//
onUploadedtwo(lists) {
lists.forEach((item) => {
this.form.legalPhoto.push(item.response.result);
});
},
//
next() {
this.$refs.firstForm.validate((valid) => {
if (valid) {
let params = JSON.parse(JSON.stringify(this.form));
params.legalPhoto = this.form.legalPhoto.toString();
params.licencePhoto = this.form.licencePhoto.toString();
if (
this.form.legalPhoto != "" &&
this.form.legalId != "" &&
this.form.legalName != ""
) {
applyFirst(params)
.then((res) => {
if (res.data.success) {
uni.navigateTo({
url: "/pages/mine/openShop/secon",
});
} else {
uni.showToast({
title: "请正确输入",
icon: "none",
duration: 1500,
});
}
})
.catch((err) => {
uni.showToast({
title: "请正确输入",
icon: "none",
duration: 1500,
});
});
} else {
uni.showToast({
title: "请正确输入",
icon: "none",
duration: 1500,
});
}
} else {
this.$refs.uToast.show({
title: "表单校验失败,请检查输入内容",
type: "error",
});
}
});
},
},
};
</script>
<style lang="scss" scoped>
::v-deep {
.u-form-item--left__content {
width: 100px;
white-space: nowrap;
}
.bunem {
width: 309px;
margin-top: 20px;
height: 41px;
font-size: 15px;
line-height: 41px;
text-align: center;
color: #ffffff;
margin-bottom: 35px;
}
.u-input {
margin-left: 30px; //
}
}
</style>

View File

@ -0,0 +1,189 @@
<template>
<div class="photo-msg">
<u-form ref="secondForm" :model="form" :rules="rules" :label-width="250">
<h4>财务资质信息</h4>
<u-form-item prop="settlementBankAccountName" label="银行开户名">
<u-input
type="text"
v-model="form.settlementBankAccountName"
placeholder="请填写银行开户名称"
/>
</u-form-item>
<u-form-item prop="settlementBankAccountNum" label="银行账号">
<u-input
type="text"
v-model="form.settlementBankAccountNum"
placeholder="请填写银行账号"
/>
</u-form-item>
<u-form-item prop="settlementBankBranchName" label="开户银行支行名称">
<u-input
type="text"
v-model="form.settlementBankBranchName"
placeholder="请填写开户银行支行名称"
/>
</u-form-item>
<u-form-item prop="settlementBankJointName" label="支行联行号">
<u-input
type="text"
v-model="form.settlementBankJointName"
placeholder="请填写支行联行号"
/>
</u-form-item>
<u-form-item>
<!-- <button @click="uni.navigateBack()" :style="{background:'#F50505'}">返回</button> -->
<button type="primary" @click="next" :style="{ background: '#FE3C3C' }" class="bunem">
填写其他信息
</button>
</u-form-item>
</u-form>
</div>
</template>
<script>
import { applySecond } from "@/api/goods";
export default {
// props: {
// content: {
// default: {},
// type: Object,
// },
// },
data() {
return {
loading: false, //
form: {}, //
rules: {
//
settlementBankAccountName: [
{ required: true, message: "请填写银行开户名称", trigger: "blur" },
{
min: 2,
max: 20,
message: "长度在 2 到 20 个字符",
trigger: "blur",
},
],
settlementBankAccountNum: [
{ required: true, message: "请填写银行账号", trigger: "blur" },
{
pattern: /^\d{16,19}$/,
message: "请输入 16 到 19 位的银行账号",
trigger: "blur",
},
],
settlementBankBranchName: [
{
required: true,
message: "请填写开户银行支行名称",
trigger: "blur",
},
{
min: 4,
max: 50,
message: "长度在 4 到 50 个字符",
trigger: "blur",
},
],
settlementBankJointName: [
{ required: true, message: "请填写支行联行号", trigger: "blur" },
{
pattern: /^\d{12}$/,
message: "请输入 12 位的支行联行号",
trigger: "blur",
},
],
},
};
},
methods: {
ngm() {
uni.navigateBack({
delta: 1, //
});
},
//
next() {
this.$refs.secondForm.validate((valid) => {
if (valid) {
this.loading = true;
if (this.form.settlementBankJointName != "") {
applySecond(this.form)
.then((res) => {
if (res.data.success) {
uni.navigateTo({
url: "/pages/mine/openShop/ThirdApply",
});
}else {
uni.showToast({
title: "请正确输入",
icon: "none",
duration: 1500,
});
}
})
.catch(() => {
this.loading = false;
uni.showToast({
title: "请正确输入",
icon: "none",
duration: 1500,
});
});
} else {
console.log("error");
}
}
});
},
},
mounted() {
// if (this.content != {}) {
// this.form = JSON.parse(JSON.stringify(this.content));
// this.$forceUpdate();
// }
// this.$refs.secondForm.resetFields();
},
};
</script>
<style lang="scss" scoped>
h4 {
margin-bottom: 10px;
padding: 0 10px;
border: 1px solid #ddd;
background-color: #f8f8f8;
font-weight: bold;
color: #333;
font-size: 14px;
line-height: 40px;
text-align: left;
}
.ivu-input-wrapper {
width: 300px;
}
.photo-msg {
padding: 20px;
background-color: #fff;
border-radius: 8px;
}
::v-deep {
// .u-form-item--left__content {
// width: 100px;
// white-space: nowrap;
// }
.bunem{
width: 309px;
margin-top: 50px;
height: 41px;
font-size: 15px;
line-height: 41px;
text-align: center;
color: #ffffff;
}
.u-input {
margin-left: 30px; //
}
}
</style>

View File

@ -2,36 +2,68 @@
<div class="feedBack"> <div class="feedBack">
<div class="feedBack-box"> <div class="feedBack-box">
<h4>猜你想问</h4> <h4>猜你想问</h4>
<div class="feedBack-item" :class="{'active':feedBack.type == item.value }" @click="handleClick(index)" v-for="(item,index) in list" :key="index"> <div
class="feedBack-item"
:class="{ active: feedBack.type == item.value }"
@click="handleClick(index)"
v-for="(item, index) in list"
:key="index"
>
{{ item.text }} {{ item.text }}
</div> </div>
</div> </div>
<div class="feedBack-box"> <div class="feedBack-box">
<h4>问题反馈 <span style="margin-left:10rpx;" v-if="feedBack.type">@{{ list.find(item=>{return item.value == feedBack.type }).text }}</span></h4> <h4>
<u-input class="field-input" height="500" :border-bottom="false" v-model="feedBack.context" type="textarea" placeholder="请输入反馈信息"> 问题反馈
<span style="margin-left: 10rpx" v-if="feedBack.type"
>@{{
list.find((item) => {
return item.value == feedBack.type;
}).text
}}</span
>
</h4>
<u-input
class="field-input"
height="500"
:border-bottom="false"
v-model="feedBack.context"
type="textarea"
placeholder="请输入反馈信息"
>
</u-input> </u-input>
</div> </div>
<!-- 上传凭证 --> <!-- 上传凭证 -->
<div class="feedBack-box"> <div class="feedBack-box">
<view class="opt-view"> <view class="opt-view">
<view class="img-title">上传凭证最多5张</view> <view class="img-title">上传凭证最多1</view>
<view class="images-view"> <view class="images-view">
<u-upload :header=" { accessToken: storage.getAccessToken() }" :action="action" width="150" @on-uploaded="onUploaded" :max-count="5" :show-progress="false"></u-upload> <u-upload
:header="{ accessToken: storage.getAccessToken() }"
:action="action"
width="150"
@on-uploaded="onUploaded"
:max-count="1"
:show-progress="false"
></u-upload>
</view> </view>
</view> </view>
</div> </div>
<div class="feedBack-box"> <div class="feedBack-box">
<h4>手机号</h4> <h4>手机号</h4>
<u-input :border-bottom="false" v-model="feedBack.mobile" placeholder="请输入您的手机号"> <u-input
:border-bottom="false"
v-model="feedBack.mobile"
placeholder="请输入您的手机号"
>
</u-input> </u-input>
</div> </div>
<div class="submit" @click="submit()">提交</div> <div class="submit" @click="submit()">提交</div>
</div> </div>
</template> </template>
<script> <script>

View File

@ -6,7 +6,14 @@
</view> </view>
<u-form :model="form" ref="uForm" class="form"> <u-form :model="form" ref="uForm" class="form">
<u-form-item label="昵称" label-width="150"> <u-form-item label="昵称" label-width="150">
<u-input v-model="form.nickName" placeholder="请输入昵称" /> <u-input
v-model="form.nickName"
placeholder="请输入昵称"
maxlength="10"
/>
</u-form-item>
<u-form-item label="二维码" label-width="150">
<img :src="erwei" alt="" width="60" @click="showQrCodeInFullSize" />
</u-form-item> </u-form-item>
<u-form-item label="性别" label-width="150"> <u-form-item label="性别" label-width="150">
<u-radio-group v-model="form.sex" :active-color="lightColor"> <u-radio-group v-model="form.sex" :active-color="lightColor">
@ -14,37 +21,54 @@
<u-radio name="0"></u-radio> <u-radio name="0"></u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item label="生日" label-width="150" right-icon="arrow-right"> <u-form-item label="生日" label-width="150" right-icon="arrow-right">
<div style="width: 100%;" @click="showBirthday = true">{{ birthday || '请选择出生日期' }}</div> <div style="width: 100%" @click="showBirthday = true">
<u-picker v-model="showBirthday" mode="time" :confirm-color="lightColor" {{ birthday || "请选择出生日期" }}
@confirm="selectTime"></u-picker> </div>
<u-picker
v-model="showBirthday"
mode="time"
:confirm-color="lightColor"
@confirm="selectTime"
></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="城市" label-width="150" placeholder="请选择城市" right-icon="arrow-right"> <u-form-item
<div style="width: 100%;" @click="clickRegion">{{ form.___path || '请选择城市' }}</div> label="城市"
label-width="150"
placeholder="请选择城市"
right-icon="arrow-right"
>
<div style="width: 100%" @click="clickRegion">
{{ form.___path || "请选择城市" }}
</div>
</u-form-item> </u-form-item>
</u-form> </u-form>
<div style="display: flex; justify-content: center"></div>
<div class="bottom"> <div class="bottom">
<view class="submit" @click="submit">保存</view> <view class="submit" @click="submit">保存</view>
<view class="submit light" @click="showModalDialog">退出登录</view> <view class="submit light" @click="showModalDialog">退出登录</view>
</div> </div>
<u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true" <u-modal
:content="userInfo.id ? '确定要退出登录么?' : '确定要返回登录么?'"></u-modal> show-cancel-button
<m-city :provinceData="region" headTitle="区域选择" ref="cityPicker" @funcValue="getpickerParentValue" v-model="quitShow"
pickerSize="4"></m-city> @confirm="confirm"
:confirm-color="lightColor"
:async-close="true"
:content="userInfo.id ? '确定要退出登录么?' : '确定要返回登录么?'"
></u-modal>
<m-city
:provinceData="region"
headTitle="区域选择"
ref="cityPicker"
@funcValue="getpickerParentValue"
pickerSize="4"
></m-city>
</view> </view>
</template> </template>
<script> <script>
import { import { saveUserInfo, geterwei } from "@/api/members.js";
saveUserInfo import { upload } from "@/api/common.js";
} from "@/api/members.js";
import {
upload
} from "@/api/common.js";
import { logout } from "@/api/login"; import { logout } from "@/api/login";
import storage from "@/utils/storage.js"; import storage from "@/utils/storage.js";
import uFormItem from "@/uview-ui/components/u-form-item/u-form-item.vue"; import uFormItem from "@/uview-ui/components/u-form-item/u-form-item.vue";
@ -52,10 +76,11 @@
export default { export default {
components: { components: {
uFormItem, uFormItem,
"m-city": gkcity "m-city": gkcity,
}, },
data() { data() {
return { return {
erwei: "",
quitShow: false, quitShow: false,
userInfo: {}, userInfo: {},
lightColor: this.$lightColor, // lightColor: this.$lightColor, //
@ -69,13 +94,14 @@
___path: storage.getUserInfo().region, ___path: storage.getUserInfo().region,
}, },
birthday: storage.getUserInfo().birthday || "", // birthday: storage.getUserInfo().birthday || "", //
photo: [{ photo: [
{
text: "立即拍照", text: "立即拍照",
color: this.$mainColor color: this.$mainColor,
}, },
{ {
text: "从相册选择", text: "从相册选择",
color: this.$mainColor color: this.$mainColor,
}, },
], ],
region: [ region: [
@ -90,11 +116,21 @@
}; };
}, },
onShow() { onShow() {
console.log('personMSg')
this.userInfo = this.$options.filters.isLogin(); this.userInfo = this.$options.filters.isLogin();
console.log(this.userInfo) this.getgeterwei();
}, },
methods: { methods: {
showQrCodeInFullSize() {
uni.previewImage({
urls: [this.erwei],
current: this.erwei,
});
},
getgeterwei() {
geterwei().then((res) => {
this.erwei = res.data.result;
});
},
showModalDialog() { showModalDialog() {
this.quitShow = true; this.quitShow = true;
}, },
@ -103,8 +139,8 @@
storage.setRefreshToken(""); storage.setRefreshToken("");
storage.setUserInfo({}); storage.setUserInfo({});
// vlog // vlog
storage.setVlogToken("") storage.setVlogToken("");
storage.setVlogUserInfo({}) storage.setVlogUserInfo({});
this.$options.filters.navigateToLogin("redirectTo"); this.$options.filters.navigateToLogin("redirectTo");
}, },
/** /**
@ -119,7 +155,6 @@
* 退出登录 * 退出登录
*/ */
quiteLoginOut() { quiteLoginOut() {
console.log(this.$options)
this.$options.filters.quiteLoginOut(); this.$options.filters.quiteLoginOut();
}, },
/** /**
@ -181,7 +216,6 @@
}, },
success: (uploadFileRes) => { success: (uploadFileRes) => {
let data = JSON.parse(uploadFileRes.data); let data = JSON.parse(uploadFileRes.data);
console.log(data)
this.form.face = data.result; this.form.face = data.result;
}, },
}); });
@ -269,9 +303,18 @@
width: 100%; width: 100%;
> .submit { > .submit {
background: $light-color; background: $light-color;
background: #fe3c3c;
color: #fff; color: #fff;
width: 40%; width: 40%;
} }
}
::v-deep {
.u-radio__icon-wrap--checked {
// background: #FE3C3C;
// border: 1px solid #FE3C3C;
border-color: #fe3c3c !important;
background-color: #fe3c3c !important;
}
} }
</style> </style>

View File

@ -4,9 +4,15 @@
<div class="box"> <div class="box">
<div class="circle-box"> <div class="circle-box">
<div class="cricle" @click="signIn()"> <div class="cricle" @click="signIn()">
<span v-if="!ifSign" :class="{ active: signFlag || ifSign }">签到</span> <span v-if="!ifSign" :class="{ active: signFlag || ifSign }"
<span v-else :class="{ active: signFlag || ifSign }" >签到</span
:style="ifSign ? 'transform: rotateY(0deg);' : ''">已签</span> >
<span
v-else
:class="{ active: signFlag || ifSign }"
:style="ifSign ? 'transform: rotateY(0deg);' : ''"
>已签</span
>
</div> </div>
</div> </div>
<text class="tips">坚持每天连续签到可以获多重奖励哦</text> <text class="tips">坚持每天连续签到可以获多重奖励哦</text>
@ -16,28 +22,46 @@
<view class="date-con"> <view class="date-con">
<view class="date-tit"> <view class="date-tit">
<div class="current-month"> <div class="current-month">
<div class="day">每日记录<span> ({{ currentMonth }})</span></div> <div class="day">
每日记录<span> ({{ currentMonth }})</span>
</div>
</div> </div>
</view> </view>
<view class="week"> <view class="week">
<text v-for="item in weekArr" :key="item.id">{{ item }}</text> <text v-for="item in weekArr" :key="item.id">{{ item }}</text>
</view> </view>
<view class="date" v-for="obj in dataObj" :key="obj.id"> <view class="date" v-for="obj in dataObj" :key="obj.id">
<view class="item" v-for="item in obj" :key="item.id" :class="item == '' ? 'hide' : ''" <view
:animation="item == currentDay ? animationData : ''"> class="item"
<view class="just" :class="signArr.indexOf(item) != -1 ? 'active' : ''"> v-for="item in obj"
:key="item.id"
:class="item == '' ? 'hide' : ''"
:animation="item == currentDay ? animationData : ''"
>
<view
class="just"
:class="signArr.indexOf(item) != -1 ? 'active' : ''"
>
<view class="top">{{ item }} </view> <view class="top">{{ item }} </view>
<view class="bottom"> <view class="bottom">
<u-icon name="error" v-if="item <= currentDay" color="#999"></u-icon> <u-icon
name="error"
v-if="item <= currentDay"
color="#999"
></u-icon>
</view> </view>
</view> </view>
<view class="back" :class="signArr.indexOf(item) != -1 ? 'active' : ''" :style=" <view
class="back"
:class="signArr.indexOf(item) != -1 ? 'active' : ''"
:style="
signArr.indexOf(item) != -1 && ifSign signArr.indexOf(item) != -1 && ifSign
? 'transform: rotateY(0deg);' ? 'transform: rotateY(0deg);'
: signArr.indexOf(item) != -1 && item != currentDay : signArr.indexOf(item) != -1 && item != currentDay
? 'transform: rotateY(0deg);' ? 'transform: rotateY(0deg);'
: '' : ''
"> "
>
<view class="top">{{ item }}</view> <view class="top">{{ item }}</view>
<view class="bottom"> <view class="bottom">
<u-icon name="checkmark" :color="aiderLightColor"></u-icon> <u-icon name="checkmark" :color="aiderLightColor"></u-icon>
@ -54,7 +78,12 @@
<text class="close" @click="close">×</text> <text class="close" @click="close">×</text>
</view> </view>
<view class="mask-con"> <view class="mask-con">
<u-icon size="120" style="margin: 50rpx 0" :color="aiderLightColor" name="checkmark"></u-icon> <u-icon
size="120"
style="margin: 50rpx 0"
:color="aiderLightColor"
name="checkmark"
></u-icon>
<text class="text">连续签到可获得额外奖励哦</text> <text class="text">连续签到可获得额外奖励哦</text>
</view> </view>
</view> </view>
@ -293,6 +322,11 @@ page {
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep {
.u-icon__icon{
color: #fe3c3c !important;
}
}
.date-card { .date-card {
padding: 0 32rpx; padding: 0 32rpx;
margin: 32rpx 0; margin: 32rpx 0;
@ -309,12 +343,11 @@ page {
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
border-radius: 50%; border-radius: 50%;
background: $aider-light-color; background: #fe3c3c;
box-shadow: 0 4rpx 24rpx 0 rgba($color: $aider-light-color, $alpha: 1); box-shadow: 0 4rpx 24rpx 0 #fe3c3c;
display: flex; display: flex;
justify-content: center; //X justify-content: center; //X
align-items: center; // Y align-items: center; // Y
} }
.cricle { .cricle {

View File

@ -86,7 +86,7 @@
<div v-for="(item, index) in goodsList" :key="index" class="goods-row"> <div v-for="(item, index) in goodsList" :key="index" class="goods-row">
<div class="flex goods-col"> <div class="flex goods-col">
<div class="goods-img" @click="navigateToDetailPage(item)"> <div class="goods-img" @click="navigateToDetailPage(item)">
<u-image width="230rpx" height="230rpx" :src="item.content.thumbnail"> <u-image width="230rpx" height="230rpx" :src="imgfun(item.content.thumbnail)">
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
</u-image> </u-image>
</div> </div>
@ -151,7 +151,7 @@
<view class="goods-list"> <view class="goods-list">
<view v-for="(item, index) in goodsList" :key="index" class="goods-item"> <view v-for="(item, index) in goodsList" :key="index" class="goods-item">
<view class="image-wrapper" @click="navigateToDetailPage(item)"> <view class="image-wrapper" @click="navigateToDetailPage(item)">
<image :src="item.content.thumbnail" mode="aspectFill"></image> <image :src="imgfun(item.content.thumbnail)" mode="aspectFill"></image>
</view> </view>
<view class="goods-detail"> <view class="goods-detail">
<div class="title clamp" @click="navigateToDetailPage(item)">{{ item.content.goodsName }}</div> <div class="title clamp" @click="navigateToDetailPage(item)">{{ item.content.goodsName }}</div>

View File

@ -19,7 +19,7 @@
<view v-for="(sku, _index) in order.orderItems" :key="_index"> <view v-for="(sku, _index) in order.orderItems" :key="_index">
<view class="goods-item-view"> <view class="goods-item-view">
<view> <view>
<u-image border-radius="6rpx" width="132rpx" height="132rpx" class="goods_img" :src="sku.image" <u-image border-radius="6rpx" width="132rpx" height="132rpx" class="goods_img" :src="imgfun(sku.image)"
alt /> alt />
</view> </view>
<view class="goods-info"> <view class="goods-info">

View File

@ -307,6 +307,8 @@ import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
export default { export default {
onLoad: function (val) { onLoad: function (val) {
console.log(val,'======');
this.routerVal = val; this.routerVal = val;
}, },
components: { components: {

View File

@ -1,56 +1,113 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<div v-if="!wechatLogin"> <div v-if="!wechatLogin">
<u-navbar :is-back="true" :border-bottom="false" :custom-back="customback"></u-navbar> <!-- <u-navbar :is-back="true" :border-bottom="false" :custom-back="customback"></u-navbar> -->
<div> <div class="imgage">
<div class="title">{{ loginTitleWay[current].title }}</div> <div>便捷生活畅玩无终街</div>
<!-- <div class="title">{{ loginTitleWay[current].title }}</div>
<div :class="current == 1 ? 'desc-light' : 'desc'"> <div :class="current == 1 ? 'desc-light' : 'desc'">
{{ loginTitleWay[current].desc {{ loginTitleWay[current].desc
}}<span v-if="current == 1">{{ mobile | secrecyMobile }}</span> }}<span v-if="current == 1">{{ mobile | secrecyMobile }}</span>
</div> </div> -->
</div> </div>
<!-- 手机号 --> <!-- 手机号 -->
<div v-show="current == 0"> <div v-show="current == 0" style="padding: 0px 40px">
<u-input :custom-style="inputStyle" :placeholder-style="placeholderStyle" placeholder="请输入手机号 (11位)" <u-input
class="mobile" focus v-model="mobile" type="number" maxlength="11" /> :custom-style="inputStyle"
<div :class="!enabuleFetchCode ? 'disable' : 'fetch'" @click="fetchCode" class="btn"> :placeholder-style="placeholderStyle"
placeholder="请输入手机号 (11位)"
class="mobile"
focus
v-model="mobile"
type="number"
maxlength="11"
/>
<div
:class="!enabuleFetchCode ? 'disable' : 'fetch'"
@click="fetchCode"
class="btn"
>
获取验证码 获取验证码
</div> </div>
<div class="flex"> <div class="flex">
<u-checkbox-group :icon-size="24" width="45rpx"> <u-checkbox-group :icon-size="24" width="45rpx">
<u-checkbox shape="circle" v-model="enabulePrivacy" active-color="#FF5E00"></u-checkbox> <u-checkbox
shape="circle"
v-model="enabulePrivacy"
active-color="#FF5E00"
></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
<div class="tips"> <div class="tips">
未注册的手机号验证后将自动创建用户账号登录即代表您已同意<span @click="navigateToPrivacy('privacy')">使用条款及隐私协议</span> 未注册的手机号验证后将自动创建用户账号登录即代表您已同意<span
@click="navigateToPrivacy('privacy')"
>使用条款及隐私协议</span
>
</div> </div>
</div> </div>
</div> </div>
<!-- 输入验证码 --> <!-- 输入验证码 -->
<div v-show="current == 1" class="box-code"> <div v-show="current == 1" class="box-code">
<verifyCode type="bottom" @confirm="submit" boxActiveColor="#D8D8D8" v-model="code" isFocus <verifyCode
boxNormalColor="#D8D8D8" cursorColor="#D8D8D8" /> type="bottom"
@confirm="submit"
boxActiveColor="#D8D8D8"
v-model="code"
isFocus
boxNormalColor="#D8D8D8"
cursorColor="#D8D8D8"
/>
<div class="fetch-btn"> <div class="fetch-btn">
<u-verification-code change-text="验证码已发送x" end-text="重新获取验证码" unique-key="page-login" <u-verification-code
:seconds="seconds" @end="end" @start="start" ref="uCode" change-text="验证码已发送x"
@change="codeChange"></u-verification-code> end-text="重新获取验证码"
<span @tap="fetchCode" :style="{ color: codeColor }"> {{ tips }}</span> unique-key="page-login"
:seconds="seconds"
@end="end"
@start="start"
ref="uCode"
@change="codeChange"
></u-verification-code>
<span @tap="fetchCode" :style="{ color: codeColor }">
{{ tips }}</span
>
</div> </div>
</div> </div>
<!-- 循环出当前可使用的第三方登录模式 --> <!-- 循环出当前可使用的第三方登录模式 -->
<div class="flex login-list"> <div class="flex login-list">
<div v-if="item.code" :style="{ background: item.color }" class="login-item" <div
v-for="(item, index) in loginList" :key="index"> v-if="item.code"
<u-icon v-if="item.title != 'APPLE'" color="#fff" size="42" :name="item.icon" :style="{ background: item.color }"
@click="navigateLogin(item)"> class="login-item"
v-for="(item, index) in loginList"
:key="index"
>
<u-icon
v-if="item.title != 'APPLE'"
color="#fff"
size="42"
:name="item.icon"
@click="navigateLogin(item)"
>
</u-icon> </u-icon>
<u-image v-else src="/static/appleidButton@2x.png" :lazy-load="false" @click="navigateLogin(item)" <u-image
width="80" height="80" /> v-else
src="/static/appleidButton@2x.png"
:lazy-load="false"
@click="navigateLogin(item)"
width="80"
height="80"
/>
</div> </div>
</div> </div>
<myVerification v-if="codeFlag" @send="verification" class="verification" ref="verification" <myVerification
business="LOGIN" /> v-if="codeFlag"
@send="verification"
class="verification"
ref="verification"
business="LOGIN"
/>
</div> </div>
<view v-else> <view v-else>
<wechatH5Login /> <wechatH5Login />
@ -59,34 +116,22 @@
</template> </template>
<script> <script>
import { import { openIdLogin, loginCallback } from "@/api/connect.js";
openIdLogin,
loginCallback
} from "@/api/connect.js";
import api from "@/config/api.js"; import api from "@/config/api.js";
import { import { sendMobile, smsLogin } from "@/api/login";
sendMobile,
smsLogin
} from "@/api/login";
import myVerification from "@/components/verification/verification.vue"; // import myVerification from "@/components/verification/verification.vue"; //
import uuid from "@/utils/uuid.modified.js"; // uuid import uuid from "@/utils/uuid.modified.js"; // uuid
import verifyCode from "@/components/verify-code/verify-code"; import verifyCode from "@/components/verify-code/verify-code";
import { import { getUserInfo } from "@/api/members";
getUserInfo import { whetherNavigate } from "@/utils/Foundation"; //
} from "@/api/members";
import {
whetherNavigate
} from "@/utils/Foundation"; //
import storage from "@/utils/storage.js"; // import storage from "@/utils/storage.js"; //
import wechatH5Login from "./wechatH5Login.vue"; import wechatH5Login from "./wechatH5Login.vue";
import { import { webConnect } from "@/api/connect.js";
webConnect
} from "@/api/connect.js";
export default { export default {
components: { components: {
myVerification, myVerification,
verifyCode, verifyCode,
wechatH5Login wechatH5Login,
}, },
data() { data() {
@ -100,7 +145,8 @@
codeColor: "#999", // codeColor: "#999", //
lightColor: this.$lightColor, lightColor: this.$lightColor,
seconds: 60, // seconds: 60, //
loginTitleWay: [{ loginTitleWay: [
{
title: "欢迎登录", title: "欢迎登录",
desc: "登录后更精彩,美好生活即将开始", desc: "登录后更精彩,美好生活即将开始",
}, },
@ -144,7 +190,7 @@
code: "APPLE", code: "APPLE",
}, },
], ],
initurl:false initurl: false,
}; };
}, },
@ -285,29 +331,27 @@
}, },
}, },
onLoad(options) { onLoad(options) {
if(options.init=='index'){ if (options.init == "index") {
this.initurl = true this.initurl = true;
} }
console.log((options))
if (options && options.state) { if (options && options.state) {
this.stateLogin(options.state); this.stateLogin(options.state);
} }
}, },
methods: { methods: {
customback() { customback() {
if (this.initurl) { if (this.initurl) {
uni.switchTab({ uni.switchTab({
url:'/pages/tabbar/vlog/index?init=ok' url: "/pages/tabbar/vlog/index?init=ok",
}) });
} else { } else {
uni.navigateBack() uni.navigateBack();
} }
}, },
// //
stateLogin(state) { stateLogin(state) {
loginCallback(state).then((res) => { loginCallback(state).then((res) => {
console.log(res) console.log(res);
let data = res.data; let data = res.data;
if (data.success) { if (data.success) {
storage.setAccessToken(data.result.accessToken); storage.setAccessToken(data.result.accessToken);
@ -321,11 +365,11 @@
storage.setUserInfo(user.data.result); storage.setUserInfo(user.data.result);
storage.setHasLogin(true); storage.setHasLogin(true);
}); });
getCurrentPages().length > 1 ? getCurrentPages().length > 1
uni.navigateBack({ ? uni.navigateBack({
delta: getCurrentPages().length - 2, delta: getCurrentPages().length - 2,
}) : })
uni.switchTab({ : uni.switchTab({
url: "/pages/tabbar/home/index", url: "/pages/tabbar/home/index",
}); });
} }
@ -462,7 +506,10 @@
// #ifdef H5 // #ifdef H5
let code = connectLogin.code; let code = connectLogin.code;
let buyer = api.buyer; let buyer = api.buyer;
window.open(buyer + `/passport/connect/connect/login/web/` + code, "_self"); window.open(
buyer + `/passport/connect/connect/login/web/` + code,
"_self"
);
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
this.nonH5OpenId(connectLogin); this.nonH5OpenId(connectLogin);
@ -479,24 +526,27 @@
storage.setRefreshToken(""); storage.setRefreshToken("");
storage.setUserInfo({}); storage.setUserInfo({});
// vlog // vlog
storage.setVlogToken("") storage.setVlogToken("");
storage.setVlogUserInfo({}) storage.setVlogUserInfo({});
/** /**
* 执行登录 * 执行登录
*/ */
smsLogin({ smsLogin(
{
mobile: this.mobile, mobile: this.mobile,
code: this.code code: this.code,
}, this.clientType).then((res) => { },
this.clientType
).then((res) => {
// console.log(res) // console.log(res)
if (res.data.success) { if (res.data.success) {
const infoData = res.data.result const infoData = res.data.result;
const vlogInfo = JSON.parse(infoData.tikUser) const vlogInfo = JSON.parse(infoData.tikUser);
storage.setAccessToken(infoData.accessToken); storage.setAccessToken(infoData.accessToken);
storage.setRefreshToken(infoData.refreshToken); storage.setRefreshToken(infoData.refreshToken);
// vlogtokenvlog // vlogtokenvlog
storage.setVlogToken(vlogInfo.userToken) storage.setVlogToken(vlogInfo.userToken);
storage.setVlogUserInfo(vlogInfo) storage.setVlogUserInfo(vlogInfo);
/** /**
* 登录成功后获取个人信息 * 登录成功后获取个人信息
@ -610,7 +660,7 @@
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrapper { .wrapper {
padding: 0 80rpx; // padding: 0 80rpx;
} }
.title { .title {
@ -652,11 +702,12 @@
} }
.disable { .disable {
background: linear-gradient(90deg, #ffdcba 2.21%, #ffcfb2 99.86%); // background: linear-gradient(90deg, #ffdcba 2.21%, #ffcfb2 99.86%);
background: #FE3C3C;
} }
.fetch { .fetch {
background: linear-gradient(57.72deg, #ff8a19 18.14%, #ff5e00 98.44%); background: #FE3C3C;
} }
.btn { .btn {
@ -696,9 +747,11 @@
.login-list { .login-list {
display: flex; display: flex;
width: 590rpx; width: 80%;
position: absolute; margin: 0 auto;
bottom: 20px; margin-top: 25vh;
// position: absolute;
// bottom: 20px;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
@ -714,4 +767,19 @@
margin: 0 20rpx; margin: 0 20rpx;
} }
.imgage {
width: 100%;
height: 37.5vh;
background: url("./static/logn.png");
background-size: 100% 100%;
& > div {
width: 100%;
height: 80%;
display: flex;
justify-content: center;
align-items: end;
color: #fff;
font-size: 14px;
}
}
</style> </style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -16,6 +16,8 @@
}, },
onLoad (e) { onLoad (e) {
const params = JSON.parse((decodeURIComponent(e.params))) const params = JSON.parse((decodeURIComponent(e.params)))
console.log(params,'=============');
chat.init({ chat.init({
sign: params.mpSign, // sign: params.mpSign, //
token: params.token, // token: params.token, //

View File

@ -18,6 +18,7 @@
" "
:thumbnail="goodsDetail.thumbnail" :thumbnail="goodsDetail.thumbnail"
:goodsName="goodsDetail.goodsName" :goodsName="goodsDetail.goodsName"
:price="goodsDetail.goodsName"
type="goods" type="goods"
@close="shareFlage = false" @close="shareFlage = false"
/> />
@ -38,7 +39,11 @@
> >
<div class="headerRow"> <div class="headerRow">
<div class="backs"> <div class="backs">
<u-icon @click="back()" name="arrow-left" class="icon-back"></u-icon> <u-icon
@click="back()"
name="arrow-left"
class="icon-back"
></u-icon>
<u-icon <u-icon
name="list" name="list"
@ -46,7 +51,10 @@
class="icon-list" class="icon-list"
></u-icon> ></u-icon>
</div> </div>
<div class="headerList" :class="headerFlag ? 'tab-bar' : 'tab-bar scroll-hide'"> <div
class="headerList"
:class="headerFlag ? 'tab-bar' : 'tab-bar scroll-hide'"
>
<div class="headerRow"> <div class="headerRow">
<div <div
class="nav-item" class="nav-item"
@ -143,7 +151,10 @@
<view> <view>
<view class="-goods-flex"> <view class="-goods-flex">
<!-- 如果有积分显示积分 --> <!-- 如果有积分显示积分 -->
<view class="-goods-price" v-if="goodsDetail.price != undefined"> <view
class="-goods-price"
v-if="goodsDetail.price != undefined"
>
<span v-if="pointDetail.points"> <span v-if="pointDetail.points">
<span class="price">{{ pointDetail.points }}</span> <span class="price">{{ pointDetail.points }}</span>
<span>积分</span> <span>积分</span>
@ -151,7 +162,9 @@
<span v-else> <span v-else>
<span>¥</span <span>¥</span
><span class="price">{{ formatPrice(goodsDetail.price)[0] }}</span ><span class="price">{{
formatPrice(goodsDetail.price)[0]
}}</span
>.{{ formatPrice(goodsDetail.price)[1] }} >.{{ formatPrice(goodsDetail.price)[1] }}
</span> </span>
</view> </view>
@ -169,9 +182,10 @@
:color="favorite ? '#f2270c' : '#262626'" :color="favorite ? '#f2270c' : '#262626'"
:name="favorite ? 'heart-fill' : 'heart'" :name="favorite ? 'heart-fill' : 'heart'"
></u-icon> ></u-icon>
<view :style="{ color: favorite ? '#f2270c' : '#262626' }">{{ <view
favorite ? "已收藏" : "收藏" :style="{ color: favorite ? '#f2270c' : '#262626' }"
}}</view> >{{ favorite ? "已收藏" : "收藏" }}</view
>
</view> </view>
</view> </view>
<view class="-goods-name desc-bold"> <view class="-goods-name desc-bold">
@ -188,8 +202,14 @@
<view class="card-flex" @click="shutMask(1)"> <view class="card-flex" @click="shutMask(1)">
<view class="card-title"> 促销 </view> <view class="card-title"> 促销 </view>
<view class="card-content"> <view class="card-content">
<span v-if="PromotionList && emptyPromotion()">暂无促销信息</span> <span v-if="PromotionList && emptyPromotion()"
<PromotionLayout v-else @shutMasks="shutMask" :res="PromotionList" /> >暂无促销信息</span
>
<PromotionLayout
v-else
@shutMasks="shutMask"
:res="PromotionList"
/>
</view> </view>
<view class="card-bottom"> <view class="card-bottom">
<u-icon name="more-dot-fill"></u-icon> <u-icon name="more-dot-fill"></u-icon>
@ -205,7 +225,10 @@
/> />
<!-- 配置地址 如果是虚拟产品的时候不展示 --> <!-- 配置地址 如果是虚拟产品的时候不展示 -->
<view class="card-box" v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS'"> <view
class="card-box"
v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS'"
>
<view class="card-flex" @click="shutMask(4)"> <view class="card-flex" @click="shutMask(4)">
<view class="card-title"> 已选 </view> <view class="card-title"> 已选 </view>
<view class="card-content"> <view class="card-content">
@ -220,7 +243,7 @@
<u-icon name="more-dot-fill"></u-icon> <u-icon name="more-dot-fill"></u-icon>
</view> </view>
</view> </view>
<view class="card-flex" @click="shutMask(3)"> <view class="card-flex" @click="shutMask(3)" v-if="ste==1">
<view class="card-title"> 送至</view> <view class="card-title"> 送至</view>
<view class="card-content" > <view class="card-content" >
<span v-if="delivery">{{ <span v-if="delivery">{{
@ -228,6 +251,17 @@
}}</span> }}</span>
<span v-else>暂无地址信息</span> <span v-else>暂无地址信息</span>
</view> </view>
<view class="card-bottom">
<u-icon name="more-dot-fill"></u-icon>
</view>
</view>
<view class="card-flex" v-else>
<view class="card-title"> 店铺位置</view>
<view class="card-content" >
{{ addren }}
</view>
<view class="card-bottom"> <view class="card-bottom">
<u-icon name="more-dot-fill"></u-icon> <u-icon name="more-dot-fill"></u-icon>
</view> </view>
@ -245,14 +279,14 @@
:res="recommendList" :res="recommendList"
/> />
<!-- 宝贝详情 --> <!-- 宝贝详情
<GoodsIntro <GoodsIntro
id="main9" id="main9"
:res="goodsDetail" :res="goodsDetail"
:goodsParams="goodsParams" :goodsParams="goodsParams"
:goodsId="goodsDetail.goodsId" :goodsId="goodsDetail.goodsId"
v-if="goodsDetail.id" v-if="goodsDetail.id"
/> /> -->
<!-- 宝贝推荐 --> <!-- 宝贝推荐 -->
<GoodsRecommend id="main11" :res="likeGoodsList" /> <GoodsRecommend id="main11" :res="likeGoodsList" />
@ -261,7 +295,10 @@
<view class="page-bottom mp-iphonex-bottom" id="pageBottom"> <view class="page-bottom mp-iphonex-bottom" id="pageBottom">
<view class="icon-btn"> <view class="icon-btn">
<view class="icon-btn-item" @click="navigateToStore(goodsDetail.storeId)"> <view
class="icon-btn-item"
@click="navigateToStore(goodsDetail.storeId)"
>
<u-icon size="34" class="red" name="home-fill"></u-icon> <u-icon size="34" class="red" name="home-fill"></u-icon>
<view class="red icon-btn-name">店铺</view> <view class="red icon-btn-name">店铺</view>
</view> </view>
@ -279,17 +316,24 @@
<view class="detail-btn" v-if="!isGroup"> <view class="detail-btn" v-if="!isGroup">
<view <view
class="to-store-car to-store-btn" class="to-store-car to-store-btn"
v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS'" v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS' && ste==1 "
@click="shutMask(4)" @click="shutMask(4)"
> >
加入购物车</view 加入购物车</view
> >
<view class="to-buy to-store-btn" @click="shutMask(4, 'buy')">立即购买</view> <view class="to-buy to-store-btn" @click="shutMask(4, 'buy')"
<view class="to-store-car to-store-btn" v-if="startTimer">暂未开始</view> >立即购买</view
>
<view class="to-store-car to-store-btn" v-if="startTimer"
>暂未开始</view
>
</view> </view>
<!-- 拼团结算 --> <!-- 拼团结算 -->
<view class="detail-btn" v-else> <view class="detail-btn" v-else>
<view class="to-store-car pt-buy to-store-btn" @click="shutMask(4, 'buy')"> <view
class="to-store-car pt-buy to-store-btn"
@click="shutMask(4, 'buy')"
>
<view>{{ goodsDetail.price | unitPrice }}</view> <view>{{ goodsDetail.price | unitPrice }}</view>
<view>单独购买</view> <view>单独购买</view>
</view> </view>
@ -358,7 +402,12 @@
<script> <script>
/************接口API***************/ /************接口API***************/
import { getGoods, getGoodsList, getMpScene, getGoodsDistribution } from "@/api/goods.js"; import {
getGoods,
getGoodsList,
getMpScene,
getGoodsDistribution,
} from "@/api/goods.js";
import * as API_trade from "@/api/trade.js"; import * as API_trade from "@/api/trade.js";
import * as API_Members from "@/api/members.js"; import * as API_Members from "@/api/members.js";
import * as API_store from "@/api/store.js"; import * as API_store from "@/api/store.js";
@ -382,8 +431,11 @@ import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块
import popupAddress from "./product/popup/address"; // import popupAddress from "./product/popup/address"; //
import shares from "@/components/m-share/index"; // import shares from "@/components/m-share/index"; //
import popups from "@/components/popups/popups"; // import popups from "@/components/popups/popups"; //
import { TUILogin } from "@tencentcloud/tui-core";
import { TUIChatKit } from "@/TUIKit";
import { getUserimInfo } from "@/api/members";
import setup from "./product/popup/popup"; import setup from "./product/popup/popup";
TUIChatKit.init();
export default { export default {
components: { components: {
popups, popups,
@ -400,9 +452,11 @@ export default {
GoodsSwiper, GoodsSwiper,
popupGoods, popupGoods,
popupAddress, popupAddress,
TUIChatKit
}, },
data() { data() {
return { return {
addren:"",
setup, setup,
promotionShow: false, // promotionShow: false, //
promotionFlag: true, // promotionFlag: true, //
@ -524,6 +578,7 @@ export default {
routerVal: "", routerVal: "",
IMLink: "", // IM IMLink: "", // IM
ste:1
}; };
}, },
@ -549,6 +604,7 @@ export default {
}, },
}, },
mounted() { mounted() {
this.ste=uni.getStorageSync('ste')
const { windowHeight } = uni.getSystemInfoSync(); const { windowHeight } = uni.getSystemInfoSync();
let bottomHeight = 0; let bottomHeight = 0;
let topHeight = 0; let topHeight = 0;
@ -599,7 +655,11 @@ export default {
} }
}); });
} else { } else {
this.init(this.routerVal.id, this.routerVal.goodsId, this.routerVal.distributionId); this.init(
this.routerVal.id,
this.routerVal.goodsId,
this.routerVal.distributionId
);
} }
}, },
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
@ -661,6 +721,8 @@ export default {
} }
/**商品信息以及规格信息存储 */ /**商品信息以及规格信息存储 */
this.goodsDetail = response.data.result.data; this.goodsDetail = response.data.result.data;
this.addren= response.data.result.storeAddressPath;
this.goodsSpec = response.data.result.specs; this.goodsSpec = response.data.result.specs;
this.PromotionList = response.data.result.promotionMap; this.PromotionList = response.data.result.promotionMap;
this.goodsParams = response.data.result.goodsParamsDTOList || []; this.goodsParams = response.data.result.goodsParamsDTOList || [];
@ -697,7 +759,7 @@ export default {
this.getGoodsCollectionFun(this.goodsDetail.id); this.getGoodsCollectionFun(this.goodsDetail.id);
} }
// IM 使 // IM 使
// this.getIMDetailMethods(); this.getIMDetailMethods();
}, },
async getIMDetailMethods() { async getIMDetailMethods() {
@ -708,6 +770,38 @@ export default {
}, },
linkMsgDetail() { linkMsgDetail() {
// storage.getUserInfo
getUserimInfo()
.then(({ data }) => {
if (data.success ) {
const par = data.result;
TUILogin.login({
SDKAppID: par.sdkAppId,
userID: par.userID,
userSig: par.userSig,
useUploadPlugin: true, // If you need to send rich media messages, please set to true.
framework: `vue2`, // framework used vue2 / vue3
}).then(() => {
const conversationID = `C2C${this.goodsDetail.createBy}`;
uni.navigateTo({
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`,
});
});
} else {
// 200
uni.navigateTo({
url: "/pages/passport/login",
});
}
})
.catch((err) => {
//
uni.navigateTo({
url: "/pages/passport/login",
});
});
return;
if (this.storeDetail.merchantEuid) { if (this.storeDetail.merchantEuid) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/tabbar/home/web-view?src=${this.IM}`, url: `/pages/tabbar/home/web-view?src=${this.IM}`,
@ -748,6 +842,7 @@ export default {
if (typeof val == "undefined") { if (typeof val == "undefined") {
return val; return val;
} }
return val.toFixed(2).split("."); return val.toFixed(2).split(".");
}, },
@ -880,6 +975,7 @@ export default {
keyword: this.goodsDetail.name, keyword: this.goodsDetail.name,
}).then((res) => { }).then((res) => {
this.likeGoodsList = res.data.result.content; this.likeGoodsList = res.data.result.content;
}); });
}, },

View File

@ -13,7 +13,7 @@
:fade="true" :fade="true"
duration="450" duration="450"
:lazy-load="true" :lazy-load="true"
:src="item.content.thumbnail" :src="imgfun(item.content.thumbnail)"
width="330rpx" width="330rpx"
height="330rpx" height="330rpx"
class="like-goods-uimage" class="like-goods-uimage"
@ -40,6 +40,9 @@
<script> <script>
export default { export default {
props: ["res"], props: ["res"],
mounted() {
console.log(this.res);
},
methods: { methods: {
// //
clickGoods(val) { clickGoods(val) {

View File

@ -3,7 +3,12 @@
<!-- 商店信息 --> <!-- 商店信息 -->
<view class="store-info"> <view class="store-info">
<view class="logo"> <view class="logo">
<u-image width="120rpx" mode="aspectFit" height="120rpx" :src="storeDetail.storeLogo"></u-image> <u-image
width="120rpx"
mode="aspectFit"
height="120rpx"
:src="storeDetail.storeLogo"
></u-image>
</view> </view>
<view class="name-star star-con"> <view class="name-star star-con">
<div class="name"> <div class="name">
@ -11,7 +16,9 @@
<span v-if="storeDetail.selfOperated == 1" class="shopTag">自营</span> <span v-if="storeDetail.selfOperated == 1" class="shopTag">自营</span>
</div> </div>
<div class="store-row"> <div class="store-row">
<div class="collectionNum">{{ storeDetail.collectionNum || 0 }}人关注</div> <div class="collectionNum">
{{ storeDetail.collectionNum || 0 }}人关注
</div>
<div class="goodsNum">{{ storeDetail.goodsNum || 0 }}件商品</div> <div class="goodsNum">{{ storeDetail.goodsNum || 0 }}件商品</div>
</div> </div>
</view> </view>
@ -23,16 +30,31 @@
<view class="store-recommend"> <view class="store-recommend">
<view class="store-recommend-title">商品推荐</view> <view class="store-recommend-title">商品推荐</view>
<view class="recommend-list"> <view class="recommend-list">
<view class="recommend-item" @click="clickGoods(item)" v-for="(item, index) in res" :key="index"> <view
<u-image class="recommend-item-img" :fade="true" duration="450" :lazy-load="true" :src="item.content.thumbnail" height="218rpx"> class="recommend-item"
@click="clickGoods(item)"
v-for="(item, index) in res"
:key="index"
>
<u-image
class="recommend-item-img"
:fade="true"
duration="450"
:lazy-load="true"
:src="imgfun(item.content.thumbnail)"
height="218rpx"
>
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx; ">加载失败</view> <view slot="error" style="font-size: 24rpx">加载失败</view>
</u-image> </u-image>
<view class="recommend-item-name"> <view class="recommend-item-name">
{{ item.content.goodsName }} {{ item.content.goodsName }}
</view> </view>
<view class="item-price" v-if="item.price != undefined"> <view class="item-price" v-if="item.price != undefined">
<span class="item-price-blod">{{ formatPrice(item.content.price)[0] }}</span>.{{ formatPrice(item.content.price)[1] }} <span class="item-price-blod">{{
formatPrice(item.content.price)[0]
}}</span
>.{{ formatPrice(item.content.price)[1] }}
</view> </view>
</view> </view>
</view> </view>

View File

@ -36,10 +36,11 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
> .to-buy { > .to-buy {
background-image: linear-gradient(135deg, #ffba0d, #ffc30d 69%, #ffcf0d); background-color: #fe3c3c;
} }
> .to-store-car { > .to-store-car {
background-image: linear-gradient(135deg, #f2140c, #f2270c 70%, #f24d0c); background-image: linear-gradient(135deg, #ffba0d, #ffc30d 69%, #ffcf0d);
} }
> .to-store-btn { > .to-store-btn {
flex: 1; flex: 1;

View File

@ -1,25 +1,44 @@
<template> <template>
<div> <div>
<u-navbar :border-bottom="false"> <u-navbar :border-bottom="false">
<u-search v-model="keyword" @search="search" @click="search" placeholder="请输入搜索"></u-search> <u-search
v-model="keyword"
@search="search"
@click="search"
placeholder="请输入搜索"
></u-search>
</u-navbar> </u-navbar>
<div class="wrapper"> <div class="wrapper">
<!-- 店铺信息模块 --> <!-- 店铺信息模块 -->
<div class="store flex"> <div class="store flex">
<u-image border-radius="10" width="150" height="150" :src="storeInfo.storeLogo || config.logo" mode="aspectFit"> <u-image
border-radius="10"
width="150"
height="150"
:src="storeInfo.storeLogo || config.logo"
mode="aspectFit"
>
</u-image> </u-image>
<div class="box"> <div class="box">
<div class="store-name" @click="getStoreLicencePhoto"> <div class="store-name" @click="getStoreLicencePhoto">
{{ storeInfo.storeName || ''}} {{ storeInfo.storeName || "" }}
<u-icon style="margin-left:10rpx;" name="arrow-right"></u-icon> <u-icon style="margin-left: 10rpx" name="arrow-right"></u-icon>
</div> </div>
<div class="flex store-message"> <div class="flex store-message">
<div> <span>{{ storeInfo.collectionNum || 0 }}</span>关注 </div> <div>
<div> <span>{{ storeInfo.goodsNum || 0 }}</span>件商品 </div> <span>{{ storeInfo.collectionNum || 0 }}</span
>关注
</div>
<div>
<span>{{ storeInfo.goodsNum || 0 }}</span
>件商品
</div>
</div> </div>
</div> </div>
<div class="collection"> <div class="collection">
<div class="collection-btn" @click="whetherCollection"> {{ isCollection ? '已关注' : '+ 关注' }}</div> <div class="collection-btn" @click="whetherCollection">
{{ isCollection ? "已关注" : "+ 关注" }}
</div>
</div> </div>
</div> </div>
<!-- 店铺简介 --> <!-- 店铺简介 -->
@ -34,19 +53,25 @@
</div> </div>
</div> </div>
<!-- 优惠券 --> <!-- 优惠券 -->
<scroll-view scroll-x="true" show-scrollbar="false" class="discount" v-if="couponList.length > 0"> <scroll-view
scroll-x="true"
show-scrollbar="false"
class="discount"
v-if="couponList.length > 0"
>
<view class="card-box" v-for="(item, index) in couponList" :key="index"> <view class="card-box" v-for="(item, index) in couponList" :key="index">
<view class="card" @click="getCoupon(item)"> <view class="card" @click="getCoupon(item)">
<view class="money"> <view class="money">
<view> <view>
<span v-if="item.couponType == 'DISCOUNT'">{{ item.couponDiscount }}</span> <span v-if="item.couponType == 'DISCOUNT'"
>{{ item.couponDiscount }}</span
>
<span v-else>{{ item.price }}</span> <span v-else>{{ item.price }}</span>
</view> </view>
</view> </view>
<view class="xian"></view> <view class="xian"></view>
<view class="text"> <view class="text">
<text>{{'领取优惠券'}}</text> <text>{{ "领取优惠券" }}</text>
<text>{{ item.consumeThreshold | unitPrice }}元可用</text> <text>{{ item.consumeThreshold | unitPrice }}元可用</text>
</view> </view>
</view> </view>
@ -54,14 +79,31 @@
</scroll-view> </scroll-view>
<!-- tab --> <!-- tab -->
<u-tabs :list="tabs" :active-color="mainColor" :is-scroll="false" :current="current" @change="changeTab"></u-tabs> <u-tabs
:list="tabs"
:active-color="mainColor"
:is-scroll="false"
:current="current"
@change="changeTab"
></u-tabs>
<!-- menu --> <!-- menu -->
<!-- 商品 --> <!-- 商品 -->
<div class="contant" v-if="current == 0"> <div class="contant" v-if="current == 0">
<view v-if="!goodsList.length" class="empty">暂无商品信息</view> <view v-if="!goodsList.length" class="empty">暂无商品信息</view>
<view v-else class="item" v-for="(item,index) in goodsList" :key="index" @click="navigateToGoodsDetail(item)"> <view
<u-image width="100%" height="330rpx" mode="aspectFit" :src="item.content.thumbnail"> v-else
class="item"
v-for="(item, index) in goodsList"
:key="index"
@click="navigateToGoodsDetail(item)"
>
<u-image
width="100%"
height="330rpx"
mode="aspectFit"
:src="imgfun(item.content.thumbnail)"
>
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
</u-image> </u-image>
<div class="name wes-2">{{ item.content.goodsName }}</div> <div class="name wes-2">{{ item.content.goodsName }}</div>
@ -75,7 +117,11 @@
</div> </div>
<!-- 全部分类 --> <!-- 全部分类 -->
<div class="category" v-if="current == 1"> <div class="category" v-if="current == 1">
<div class="category-item" v-for="(item,index) in categoryList" :key="index"> <div
class="category-item"
v-for="(item, index) in categoryList"
:key="index"
>
<div class="flex" @click="getCategoryGoodsList(item)"> <div class="flex" @click="getCategoryGoodsList(item)">
<div>{{ item.labelName }}</div> <div>{{ item.labelName }}</div>
<div> <div>
@ -83,8 +129,16 @@
</div> </div>
</div> </div>
<!-- 分类子级 --> <!-- 分类子级 -->
<div class="child-list" v-if="item.children && item.children.length!=0"> <div
<div class="child" @click="getCategoryGoodsList(child)" v-for="(child,i) in item.children">{{child.labelName}} class="child-list"
v-if="item.children && item.children.length != 0"
>
<div
class="child"
@click="getCategoryGoodsList(child)"
v-for="(child, i) in item.children"
>
{{ child.labelName }}
</div> </div>
</div> </div>
</div> </div>
@ -101,10 +155,15 @@ import {
collectionGoods, collectionGoods,
getGoodsIsCollect, getGoodsIsCollect,
} from "@/api/members.js"; } from "@/api/members.js";
import { TUILogin } from "@tencentcloud/tui-core";
import { TUIChatKit } from "@/TUIKit";
import { getUserimInfo } from "@/api/members";
import config from "@/config/config"; import config from "@/config/config";
import storage from "@/utils/storage"; import storage from "@/utils/storage";
import { getGoodsList } from "@/api/goods.js"; import { getGoodsList } from "@/api/goods.js";
import { getAllCoupons } from "@/api/promotions.js"; import { getAllCoupons } from "@/api/promotions.js";
import setup from "./product/popup/popup";
TUIChatKit.init();
export default { export default {
data() { data() {
return { return {
@ -126,7 +185,12 @@ export default {
}, },
watch: { watch: {
current(val) { current(val) {
val == 0 ? ()=>{ this.goodsList = []; this.getGoodsData()} : this.getCategoryData(); val == 0
? () => {
this.goodsList = [];
this.getGoodsData();
}
: this.getCategoryData();
}, },
}, },
@ -188,30 +252,61 @@ export default {
* 联系客服 * 联系客服
*/ */
linkKefuDetail() { linkKefuDetail() {
// getUserimInfo()
// #ifdef MP-WEIXIN .then(({ data }) => {
console.log("data", data);
if (data.success) {
const par = data.result;
TUILogin.login({
SDKAppID: par.sdkAppId,
userID: par.userID,
userSig: par.userSig,
useUploadPlugin: true, // If you need to send rich media messages, please set to true.
framework: `vue2`, // framework used vue2 / vue3
}).then(() => {
const conversationID = `C2C${this.storeInfo.memberMobile}`;
uni.navigateTo({
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`,
});
});
} else {
// 200
uni.navigateTo({
url: "/pages/passport/login",
});
}
})
.catch((err) => {
console.log("err---------", err);
//
uni.navigateTo({
url: "/pages/passport/login",
});
});
// //
// // #ifdef MP-WEIXIN
const params = { // const params = {
// originalPrice: this.goodsDetail.original || this.goodsDetail.price, // // originalPrice: this.goodsDetail.original || this.goodsDetail.price,
uuid: storage.getUuid(), // uuid: storage.getUuid(),
token: storage.getAccessToken(), // token: storage.getAccessToken(),
sign: this.storeInfo.yzfSign, // sign: this.storeInfo.yzfSign,
mpSign: this.storeInfo.yzfMpSign, // mpSign: this.storeInfo.yzfMpSign,
}; // };
uni.navigateTo({ // uni.navigateTo({
url: // url:
"/pages/product/customerservice/index?params=" + // "/pages/product/customerservice/index?params=" +
encodeURIComponent(JSON.stringify(params)), // encodeURIComponent(JSON.stringify(params)),
}); // });
// #endif // // #endif
// #ifndef MP-WEIXIN // // #ifndef MP-WEIXIN
const sign = this.storeInfo.yzfSign; // const sign = this.storeInfo.yzfSign;
uni.navigateTo({ // uni.navigateTo({
url: // url:
"/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" + // "/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" +
sign, // sign,
}); // });
// #endif // // #endif
}, },
/** 获取店铺分类 */ /** 获取店铺分类 */

View File

@ -5,7 +5,7 @@
<div class="contant"> <div class="contant">
<view v-if="!goodsList.length" class="empty">暂无商品信息</view> <view v-if="!goodsList.length" class="empty">暂无商品信息</view>
<view v-else class="item" v-for="(item,index) in goodsList" :key="index" @click="navigateToGoodsDetail(item)"> <view v-else class="item" v-for="(item,index) in goodsList" :key="index" @click="navigateToGoodsDetail(item)">
<u-image width="100%" mode="aspectFit" height="324rpx" :src="item.content.thumbnail"> <u-image width="100%" mode="aspectFit" height="324rpx" :src="imgfun(item.content.thumbnail)">
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
</u-image> </u-image>
<div class="name">{{ item.content.goodsName }}</div> <div class="name">{{ item.content.goodsName }}</div>

1154
pages/product/vengoods.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<!-- 楼层装修组件 --> <!-- 楼层装修组件 -->
<u-navbar class="navbar" :is-back="false" :is-fixed="false"> <!-- <u-navbar class="navbar" :is-back="false" :is-fixed="false">
<div class="tab-container"> <div class="tab-container">
<div <div
v-for="(item, index) in list1" v-for="(item, index) in list1"
@ -12,20 +12,39 @@
{{ item.name }} {{ item.name }}
</div> </div>
</div> </div>
</u-navbar> </u-navbar> -->
<!-- <u-tabs-swiper ref="tabs" :list="list" :is-scroll="true" current="0"></u-tabs-swiper> -->
<u-tabs
name="cate_name"
count="cate_count"
:list="list"
:is-scroll="false"
:current="current"
@change="change"
></u-tabs>
<!-- 商城 --> <!-- 商城 -->
<tpl ref="tpl" v-if="currentTabIndex == 1" :ste="1" /> <tpl ref="tpl" v-if="currentTabIndex == 1" :ste="1" />
<!-- 本地生活 --> <!-- 本地生活 -->
<tpl ref="tpl" v-if="currentTabIndex == 0" :ste="0" /> <tpl ref="childComp" v-if="currentTabIndex == 0" :loadMore="loadMore" :ste="0" />
</div> </div>
</template> </template>
<script> <script>
import tpl from "@/pages/tabbar/home/views.vue"; import tpl from "@/pages/tabbar/home/views.vue";
import Views from "./views.vue";
export default { export default {
data() { data() {
return { return {
list: [
{
name: "本地生活",
},
{
name: "商城",
},
],
current: 0,
background: { background: {
backgroundColor: "#fff", backgroundColor: "#fff",
}, },
@ -38,39 +57,32 @@ export default {
}, },
], ],
currentTabIndex: 0, currentTabIndex: 0,
current: 0, // tabscurrenttab
swiperCurrent: 0, // swipercurrentswiper-item
loadMore: false, //
}; };
}, },
components: { components: {
tpl, tpl,
}, },
onReachBottom() {
console.log("触底了");
this.loadMore = !this.loadMore;
},
methods: { methods: {
click(item) { change(index) {
this.currentTabIndex = this.list1.indexOf(item); this.current = index;
this.currentTabIndex = index;
}, },
}, },
onPullDownRefresh() {
this.$refs.tpl.init();
uni.stopPullDownRefresh();
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tab-container {
width: 100%;
display: flex;
justify-content: space-evenly;
// background-color: #f0f0f0;
// padding: 0 16rpx 0 0;
font-size: 18px;
}
.tab-container div {
cursor: pointer;
padding: 5px 10px;
}
.tab-container div.active { .tab-container div.active {
border-bottom: 2px solid #F50505; border-bottom: 2px solid #f50505;
color:#F50505; color: #f50505;
background-color: transparent; background-color: transparent;
} }
.wrapper { .wrapper {
@ -79,5 +91,15 @@ export default {
.navbar { .navbar {
height: 100%; height: 100%;
} }
::v-deep {
.u-tabs {
padding: 25px 20px 0px 20px;
}
.u-tab-item {
color: $main-color !important;
}
.u-tab-bar {
background-color: $light-color !important;
}
}
</style> </style>

View File

@ -11,7 +11,7 @@
<div class="menu-list" style="overflow-x: auto; white-space: nowrap; scrollbar-width: none; -ms-overflow-style: none;"> <div class="menu-list" style="overflow-x: auto; white-space: nowrap; scrollbar-width: none; -ms-overflow-style: none;">
<div class="menu-item" v-for="(item, index) in res.list" :key="index"> <div class="menu-item" v-for="(item, index) in res.list" :key="index">
<div> <div>
<img class="menu-img" :src="item.img" alt="" @click="tostorePage(item)" /> <img class="menu-img" :src="item.img" alt="" @click="modelNavigateTo(item)" />
</div> </div>
<!-- <div class="menu-title">{{ item.title }}</div> --> <!-- <div class="menu-title">{{ item.title }}</div> -->
</div> </div>
@ -22,6 +22,11 @@
import { modelNavigateTo } from "./tpl"; import { modelNavigateTo } from "./tpl";
export default { export default {
title: "达人店", title: "达人店",
data() {
return {
modelNavigateTo,
};
},
props: ["res","model"], props: ["res","model"],
watch: { watch: {
res: { res: {
@ -34,6 +39,8 @@ export default {
methods: { methods: {
// //
tostorePage(val) { tostorePage(val) {
console.log(val);
uni.navigateTo({ uni.navigateTo({
url: "/pages/product/shopPage?id=" + val.url.id, url: "/pages/product/shopPage?id=" + val.url.id,
}); });
@ -91,8 +98,8 @@ export default {
} }
} }
.menu-img { .menu-img {
width: 60px; width: 80px;
height: 60px; height: 80px;
} }
.menu-title { .menu-title {
font-size: 12px; font-size: 12px;

View File

@ -0,0 +1,31 @@
.image-mode {
width: 100%;
height: 100%;
display: block;
padding: 2rpx;
}
.layout {
padding: 16rpx 0rpx 16rpx 0rpx;
margin: 8rpx 0;
background: #fff;
}
.layout,
.view-height-75,
.view-height-150 {
overflow: hidden;
}
.view-width-100 {
width: 100%;
}
.view-height-150 {
flex: 1;
}
.view-height-85 {
height: 170rpx;
flex: 1;
}

View File

@ -5,7 +5,7 @@
padding: 2rpx; padding: 2rpx;
} }
.layout { .layout {
padding: 16rpx; padding: 16rpx 0rpx 16rpx 0rpx;
margin: 8rpx 0; margin: 8rpx 0;
background: #fff; background: #fff;
} }

View File

@ -3,7 +3,7 @@
<div class="addres" @click="showPicker" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"> <div class="addres" @click="showPicker" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
{{ cityOrCounty == "" ? "请选择" : cityOrCounty }} {{ cityOrCounty == "" ? "请选择" : cityOrCounty }}
</div> </div>
<div class="search">{{ res.list[0].title }}</div> <div class="search" @click="handleSearch">{{ res.list[0].title }}</div>
<div class="shop" @click="toshop"></div> <div class="shop" @click="toshop"></div>
<m-city <m-city
:provinceData="list" :provinceData="list"

View File

@ -1,8 +1,13 @@
<template> <template>
<div class="layout"> <div class="layout">
<div v-for="item in list" :key="item.id" class="shop" @click="handleClick(item)"> <div
v-for="item in list"
:key="item.id"
class="shop"
@click="handleClick(item)"
>
<div class="pl_img"> <div class="pl_img">
<img :src="item.thumbnail" alt="" /> <img :src="imgfun(item.thumbnail)" alt="" />
<div class="price" style="font-size: 20px"> <div class="price" style="font-size: 20px">
<div>价格:{{ item.price }}</div> <div>价格:{{ item.price }}</div>
<div>限量:{{ item.geQuantity }}</div> <div>限量:{{ item.geQuantity }}</div>
@ -21,7 +26,7 @@
<script> <script>
import * as API_home from "@/api/home"; import * as API_home from "@/api/home";
export default { export default {
props: ["res"], props: ["res","loadMore"],
data() { data() {
return { return {
list: [], list: [],
@ -31,12 +36,25 @@ export default {
loadMoreStatus: "more", // loadMoreStatus: "more", //
}; };
}, },
onReachBottom() {
console.log("触底了");
},
watch: {
loadMore: {
handler(val) {
// this.loadMon()
},
deep: true
},
},
mounted() { mounted() {
this.getlist(); this.getlist();
window.addEventListener("scroll", this.handleScroll); //
// window.addEventListener('scroll', this.handleScroll);
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener("scroll", this.handleScroll); //
// window.removeEventListener('scroll', this.handleScroll);
}, },
methods: { methods: {
getlist() { getlist() {
@ -74,6 +92,15 @@ export default {
this.getlist(); this.getlist();
} }
}, },
loadMon() {
if (this.total == this.list.length) {
this.loadMoreStatus = "noMore";
return;
}
this.loadMoreStatus = "loading";
this.pageNumber++;
this.getlist();
},
}, },
}; };
</script> </script>

View File

@ -3,23 +3,38 @@
<!-- uni 中不能使用 vue component 所以用if判断每个组件 --> <!-- uni 中不能使用 vue component 所以用if判断每个组件 -->
<div v-for="(item, index) in pageData.list" :key="index"> <div v-for="(item, index) in pageData.list" :key="index">
<!-- 搜索栏如果在楼层装修顶部则会自动浮动否则不浮动 --> <!-- 搜索栏如果在楼层装修顶部则会自动浮动否则不浮动 -->
<div class="navbar" v-if="item.type == 'search'" :is-back="false" :is-fixed="false"> <div
class="navbar"
v-if="item.type == 'search'"
:is-back="false"
:is-fixed="false"
>
<search style="width: 100%" :res="item.options" /> <search style="width: 100%" :res="item.options" />
<!-- #ifndef H5 --> <!-- #ifndef H5 -->
<!-- 扫码功能 不兼容h5 详情文档: https://uniapp.dcloud.io/api/system/barcode?id=scancode --> <!-- 扫码功能 不兼容h5 详情文档: https://uniapp.dcloud.io/api/system/barcode?id=scancode -->
<div slot="right" class="navbar-right"> <!-- <div slot="right" class="navbar-right">
<u-icon name="scan" @click="scan()" color="#666" size="50"></u-icon> <u-icon name="scan" @click="scan()" color="#666" size="50"></u-icon>
</div> </div> -->
<!-- #endif --> <!-- #endif -->
</div> </div>
<carousel v-if="item.type == 'carousel'" :res="item.options" /> <carousel v-if="item.type == 'carousel'" :res="item.options" />
<titleLayout v-if="item.type == 'title'" :res="item.options" /> <titleLayout v-if="item.type == 'title'" :res="item.options" />
<leftOneRightTwo v-if="item.type == 'leftOneRightTwo'" :res="item.options" /> <leftOneRightTwo
<leftTwoRightOne v-if="item.type == 'leftTwoRightOne'" :res="item.options" /> v-if="item.type == 'leftOneRightTwo'"
<topOneBottomTwo v-if="item.type == 'topOneBottomTwo'" :res="item.options" /> :res="item.options"
<topTwoBottomOne v-if="item.type == 'topTwoBottomOne'" :res="item.options" /> />
<leftTwoRightOne
v-if="item.type == 'leftTwoRightOne'"
:res="item.options"
/>
<topOneBottomTwo
v-if="item.type == 'topOneBottomTwo'"
:res="item.options"
/>
<topTwoBottomOne
v-if="item.type == 'topTwoBottomOne'"
:res="item.options"
/>
<flexThree v-if="item.type == 'flexThree'" :res="item.options" /> <flexThree v-if="item.type == 'flexThree'" :res="item.options" />
<flexFive v-if="item.type == 'flexFive'" :res="item.options" /> <flexFive v-if="item.type == 'flexFive'" :res="item.options" />
@ -31,12 +46,11 @@
<activity v-if="item.type == 'activity'" :res="item.options" /> <activity v-if="item.type == 'activity'" :res="item.options" />
<Talent v-if="item.type == 'talent'" :res="item.options" :model="item" /> <Talent v-if="item.type == 'talent'" :res="item.options" :model="item" />
<goods v-if="item.type == 'goods'" :res="item.options" /> <goods v-if="item.type == 'goods'" :res="item.options" />
<shop v-if="item.type == 'shop'" :res="item.options" /> <shop v-if="item.type == 'shop'" :loadMore="loadMore" :res="item.options" />
<group v-if="item.type == 'group'" :res="item.options" /> <group v-if="item.type == 'group'" :res="item.options" />
<!-- <joinGroup v-if="item.type == 'joinGroup'" :res="item.options" /> --> <!-- <joinGroup v-if="item.type == 'joinGroup'" :res="item.options" /> -->
<!-- <integral v-if="item.type == 'integral'" :res="item.options" /> --> <!-- <integral v-if="item.type == 'integral'" :res="item.options" /> -->
<!-- <spike v-if="item.type == 'spike'" :res="item.options" /> --> <!-- <spike v-if="item.type == 'spike'" :res="item.options" /> -->
</div> </div>
<u-no-network></u-no-network> <u-no-network></u-no-network>
</div> </div>
@ -67,6 +81,7 @@ import tpl_shop from "@/pages/tabbar/home/template/tpl_shop"; //活动
import { getFloorData, getFloorgetBendi } from "@/api/home"; // import { getFloorData, getFloorgetBendi } from "@/api/home"; //
import permision from "@/js_sdk/wa-permission/permission.js"; // import permision from "@/js_sdk/wa-permission/permission.js"; //
import config from "@/config/config"; import config from "@/config/config";
import { nextTick } from "vue";
// TODO // TODO
// import tpl_join_group from "@/pages/tabbar/home/template/tpl_join_group"; // import tpl_join_group from "@/pages/tabbar/home/template/tpl_join_group";
// import tpl_integral from "@/pages/tabbar/home/template/tpl_integral"; // import tpl_integral from "@/pages/tabbar/home/template/tpl_integral";
@ -99,7 +114,7 @@ export default {
group: tpl_group, group: tpl_group,
Talent, Talent,
activity: tpl_activity, activity: tpl_activity,
shop:tpl_shop shop: tpl_shop,
// spike: tpl_spike, // spike: tpl_spike,
// joinGroup: tpl_join_group, // joinGroup: tpl_join_group,
// integral: tpl_integral, // integral: tpl_integral,
@ -109,14 +124,19 @@ export default {
type: Number, type: Number,
default: 0, default: 0,
}, },
loadMore: {
type: Boolean,
}, },
},
watch: { watch: {
ste(val) { ste(val) {
this.init(); this.init();
}, }
}, },
mounted() { mounted() {
this.init(); this.init();
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
// //
uni.showShareMenu({ withShareTicket: true }); uni.showShareMenu({ withShareTicket: true });
@ -127,12 +147,13 @@ export default {
// ste: this.ste, // ste: this.ste,
// }; // };
// }, // },
methods: { methods: {
/** /**
* 实例化首页数据楼层 * 实例化首页数据楼层
*/ */
init() { init() {
uni.setStorageSync('ste', this.ste); // ste uni.setStorageSync("ste", this.ste); // ste
this.pageData = ""; this.pageData = "";
if (this.ste == 1) { if (this.ste == 1) {
getFloorData().then((res) => { getFloorData().then((res) => {
@ -147,7 +168,6 @@ export default {
} }
}); });
} }
}, },
/** /**
@ -164,7 +184,7 @@ export default {
let path = encodeURIComponent(res.result); let path = encodeURIComponent(res.result);
// WX_CODE // WX_CODE
if (res.scanType == "WX_CODE") { if (res.scanType == "WX_CODE") {
console.log(res) console.log(res);
uni.navigateTo({ uni.navigateTo({
url: `/${res.path}`, url: `/${res.path}`,
}); });
@ -241,26 +261,26 @@ export default {
this.seacnCode(); this.seacnCode();
// #endif // #endif
}, },
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.wrapper { .wrapper {
width: 100%;
height: 100%; height: 100%;
} }
.navbar { .navbar {
width: 100%;
display: flex; display: flex;
height: 100%; height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: white; background: white;
padding-right: 10px; // padding-right: 10px;
} }
.navbar-right { .navbar-right {
// padding: 0 16rpx 0 0; // padding: 0 16rpx 0 0;
} }
</style> </style>

View File

@ -18,6 +18,7 @@ export default {
}, },
onLoad(params) { onLoad(params) {
this.src = decodeURIComponent(params.src); this.src = decodeURIComponent(params.src);
console.log( this.src,this.webviewStyles,'====');
}, },
}; };
</script> </script>

View File

@ -44,7 +44,14 @@
<TUIContactsea v-if="statue == 2" @switchConversation="hui" /> <TUIContactsea v-if="statue == 2" @switchConversation="hui" />
<!-- 联系人 --> <!-- 联系人 -->
<TUIContact v-else-if="statue == 1" style="height: 100%" /> <TUIContact v-else-if="statue == 1" style="height: 100%" />
<SelectFriend v-else-if="statue == 3" @con="confn" /> <!-- 群选择的 -->
<SelectFriend
v-else-if="statue == 3"
@con="hui"
:style="{ marginTop: '20px', heigth: '80%' }"
/>
<!-- 群类型 -->
<CreateGroup v-else-if="statue == 10" @con="confn" />
<SelectFriendqlioa v-else-if="statue == 4" @concen="concen" /> <SelectFriendqlioa v-else-if="statue == 4" @concen="concen" />
<!-- 站内信数据 --> <!-- 站内信数据 -->
<!-- <div > --> <!-- <div > -->
@ -89,9 +96,11 @@ import TUIContact from "@/TUIKit/components/TUIContact/index";
import TUIContactsea from "@/TUIKit/components/TUIContact/indexsea"; import TUIContactsea from "@/TUIKit/components/TUIContact/indexsea";
import { TUILogin } from "@tencentcloud/tui-core"; import { TUILogin } from "@tencentcloud/tui-core";
import ContactSearch from "@/TUIKit/components/TUIContact/contact-search/index.vue"; import ContactSearch from "@/TUIKit/components/TUIContact/contact-search/index.vue";
import CreateGroup from "@/TUIKit/components/TUIGroup/create-group/index.vue";
import { TUIChatKit } from "@/TUIKit"; import { TUIChatKit } from "@/TUIKit";
import SelectFriend from "@/TUIKit/components/TUIContact/select-friend/index.vue"; import SelectFriend from "@/TUIKit/components/TUIContact/select-friend/index.vue";
import SelectFriendqlioa from "@/TUIKit/components/TUIGroup/index.vue"; import SelectFriendqlioa from "@/TUIKit/components/TUIGroup/index.vue";
import TUICore, { ExtensionInfo, TUIConstants } from "@tencentcloud/tui-core"; import TUICore, { ExtensionInfo, TUIConstants } from "@tencentcloud/tui-core";
import storage from "@/utils/storage.js"; import storage from "@/utils/storage.js";
import { import {
@ -99,6 +108,7 @@ import {
getMember, getMember,
getMemberstate, getMemberstate,
getMemberdelete, getMemberdelete,
geterweijki,
} from "@/api/members"; } from "@/api/members";
TUIChatKit.init(); TUIChatKit.init();
let vueVersion = 2; let vueVersion = 2;
@ -114,6 +124,7 @@ export default {
SelectFriend, SelectFriend,
SelectFriendqlioa, SelectFriendqlioa,
TUIChatKit, TUIChatKit,
CreateGroup,
}, },
data() { data() {
return { return {
@ -204,7 +215,7 @@ export default {
}, },
// //
confn() { confn() {
// this.statue = 0; this.statue = 0;
this.isPopupVisible = false; this.isPopupVisible = false;
}, },
concen() { concen() {
@ -239,7 +250,6 @@ export default {
this.tole = this.meList.filter( this.tole = this.meList.filter(
(item) => item.status === "UN_READY" (item) => item.status === "UN_READY"
).length; ).length;
}); });
}, },
handleMenu() { handleMenu() {
@ -266,13 +276,18 @@ export default {
this.isPopupVisible = false; this.isPopupVisible = false;
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
console.log("扫码结果:", res); console.log("扫码结果:---", res);
this.statue=0 geterweijki(res.result).then((resfn) => {
console.log(resfn, "====");
this.getUserimInfo();
this.statue = 0;
});
this.statue = 0;
// //
}, },
fail: (err) => { fail: (err) => {
console.error("扫码失败:", err); console.error("扫码失败:", err);
this.statue=0 this.statue = 0;
}, },
}); });
}, },
@ -460,7 +475,7 @@ page {
overflow: hidden; overflow: hidden;
border: 1px solid #d9d9d9; border: 1px solid #d9d9d9;
width: 98%; width: 98%;
margin-top: 10px; margin: 10px 10px 10px 5px;
position: relative; position: relative;
} }
.content { .content {
@ -498,4 +513,5 @@ page {
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
} }
</style> </style>

View File

@ -6,61 +6,92 @@
</view> </view>
<view class="header" @click="userDetail"> <view class="header" @click="userDetail">
<view class="head-1"> <view class="head-1">
<image :src="userInfo.face || '/static/missing-face.png'"></image> <image :src="userInfo.face || '/static/imlogo.png'"></image>
</view> </view>
<view class="head-2" v-if="userInfo.id"> <view class="head-2" v-if="userInfo.id">
<view class="user-name">{{ userInfo.nickName }}</view> <view class="user-name">{{ userInfo.nickName }}</view>
</view> </view>
<view class="head-2" v-else> <view class="head-2" v-else>
<view class="user-name">登录/注册</view> <view class="user-name">登录/注册</view>
</view> </view>
<u-icon style="display: flex;align-items: flex-start;" name="arrow-right"></u-icon> <u-icon
style="display: flex; align-items: flex-start"
name="arrow-right"
></u-icon>
</view> </view>
<!-- 积分优惠券关注 --> <!-- 积分优惠券关注 -->
<div class="pointBox box"> <div class="pointBox box">
<u-row text-align="center" gutter="16" class="point"> <u-row text-align="center" gutter="16" class="point">
<u-col text-align="center" span="4" @click="navigateTo('/pages/mine/deposit/operation')"> <u-col
text-align="center"
span="4"
@click="navigateTo('/pages/mine/deposit/operation')"
>
<view>预存款</view> <view>预存款</view>
<view class="money">{{ walletNum | unitPrice }}</view> <view class="money">{{ walletNum | unitPrice }}</view>
</u-col> </u-col>
<u-col text-align="center" span="4" @click="navigateTo('/pages/cart/coupon/myCoupon')"> <u-col
text-align="center"
span="4"
@click="navigateTo('/pages/cart/coupon/myCoupon')"
>
<view>优惠券</view> <view>优惠券</view>
<view>{{ couponNum || 0 }}</view> <view>{{ couponNum || 0 }}</view>
</u-col> </u-col>
<u-col text-align="center" span="4" @click="navigateTo('/pages/mine/myTracks')"> <u-col
text-align="center"
span="4"
@click="navigateTo('/pages/mine/myTracks')"
>
<view>足迹</view> <view>足迹</view>
<view>{{ footNum || 0 }}</view> <view>{{ footNum || 0 }}</view>
</u-col> </u-col>
</u-row> </u-row>
<!-- 我的订单代付款 --> <!-- 我的订单代付款 -->
<view class="order"> <view class="order">
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=0')"> <view
class="order-item"
@click="navigateTo('/pages/order/myOrder?status=0')"
>
<div class="bag bag1"> <div class="bag bag1">
<u-icon name="order" size="35" color="#fff"></u-icon> <u-icon name="order" size="35" color="#fff"></u-icon>
</div> </div>
<view>我的订单</view> <view>我的订单</view>
</view> </view>
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=1')"> <view
class="order-item"
@click="navigateTo('/pages/order/myOrder?status=1')"
>
<div class="bag bag2"> <div class="bag bag2">
<u-icon name="bag-fill" size="35" color="#fff"></u-icon> <u-icon name="bag-fill" size="35" color="#fff"></u-icon>
</div> </div>
<view>待付款</view> <view>待付款</view>
</view> </view>
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=3')"> <view
class="order-item"
@click="navigateTo('/pages/order/myOrder?status=3')"
>
<div class="bag bag3"> <div class="bag bag3">
<u-icon name="car-fill" size="35" color="#fff"></u-icon> <u-icon name="car-fill" size="35" color="#fff"></u-icon>
</div> </div>
<view>待收货</view> <view>待收货</view>
</view> </view>
<view class="order-item" @click="navigateTo('/pages/order/evaluate/myEvaluate')"> <view
class="order-item"
@click="navigateTo('/pages/order/evaluate/myEvaluate')"
>
<div class="bag bag4"> <div class="bag bag4">
<u-icon name="star-fill" size="35" color="#fff"></u-icon> <u-icon name="star-fill" size="35" color="#fff"></u-icon>
</div> </div>
<view>待评价</view> <view>待评价</view>
</view> </view>
<view class="order-item" @click="navigateTo('/pages/order/afterSales/afterSales')"> <view
class="order-item"
@click="navigateTo('/pages/order/afterSales/afterSales')"
>
<div class="bag bag5"> <div class="bag bag5">
<u-icon name="server-fill" size="35" color="#fff"></u-icon> <u-icon name="server-fill" size="35" color="#fff"></u-icon>
</div> </div>
@ -70,8 +101,7 @@
</div> </div>
<!-- 常用工具 --> <!-- 常用工具 -->
<tool /> <tool :userInfo="userInfo" v-if="userInfo.id != undefined" ref="tool"/>
</view> </view>
</template> </template>
<script> <script>
@ -105,6 +135,8 @@ export default {
onPullDownRefresh() { onPullDownRefresh() {
this.getUserOrderNum(); this.getUserOrderNum();
this.userInfo = this.$options.filters.isLogin(); this.userInfo = this.$options.filters.isLogin();
this.$refs.tool.getUser();
}, },
// #ifndef MP // #ifndef MP
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
@ -129,7 +161,7 @@ export default {
userDetail() { userDetail() {
this.userInfo.id this.userInfo.id
? this.navigateTo("/pages/mine/set/personMsg") ? this.navigateTo("/pages/mine/set/personMsg")
: this.$options.filters.navigateToLogin();; : this.$options.filters.navigateToLogin();
}, },
async getUserOrderNum() { async getUserOrderNum() {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

View File

@ -13,7 +13,7 @@
<view class="scroll-con"> <view class="scroll-con">
<view v-if="nomsg">没有相似商品</view> <view v-if="nomsg">没有相似商品</view>
<view v-else class="con" v-for="(item,index) in goodsList" :key="index" @click="goDetail(item)"> <view v-else class="con" v-for="(item,index) in goodsList" :key="index" @click="goDetail(item)">
<image :src="item.content.thumbnail" mode=""></image> <image :src="imgfun(item.content.thumbnail)" mode=""></image>
<view class="nowrap">{{item.content.name}}</view> <view class="nowrap">{{item.content.name}}</view>
<view> <view>
<text>{{item.content.price | unitPrice}} <text>{{item.content.price | unitPrice}}

View File

@ -2,59 +2,135 @@
<view> <view>
<!-- 常用工具 --> <!-- 常用工具 -->
<view class="interact-tools" style="margin-bottom: 15px"> <view class="interact-tools" style="margin-bottom: 15px">
<div class="paddingBox"> <div class="paddingBox">
<view class="interact-container"> <view class="interact-container">
<view
class="interact-item"
@click="navigateTo('/pages/mine/invite')"
v-if="userInfo.expert"
>
<image src="/static/mine/stion.png" mode=""></image>
<view>我的推荐</view>
</view>
<view
class="interact-item"
@click="navigateTo('/pages/mine/inviteinput')"
v-if="!userInfo.expert"
>
<image src="/static/mine/smk.png" mode=""></image>
<view>邀请</view>
</view>
<view
v-if="userInfo.expert != 1"
class="interact-item"
@click="navigateTo('/pages/mine/expert/index')"
>
<image src="/static/mine/mon.png" mode=""></image>
<view>达人申请</view>
</view>
<view
v-if="userInfo.storeId == null || userInfo.storeId == ''"
class="interact-item"
@click="navigateTo('/pages/mine/openShop/index')"
>
<image src="/static/mine/shop.png" mode=""></image>
<view>店铺申请</view>
</view>
<!-- <view class="interact-item" @click="navigateTo('/pages/mine/makeMoney/index')">
<image src="/static/mine/mony.png" mode=""></image>
<view>赚钱</view>
</view> -->
<view class="interact-item" @click="navigateTo('/pages/mine/signIn')"> <view class="interact-item" @click="navigateTo('/pages/mine/signIn')">
<image src="/static/mine/sign.png" mode=""></image> <image src="/static/mine/sign.png" mode=""></image>
<view>每日签到</view> <view>每日签到</view>
</view> </view>
<view class="interact-item" @click="navigateTo('/pages/mine/point/myPoint')"> <view
class="interact-item"
@click="navigateTo('/pages/mine/point/myPoint')"
>
<image src="/static/mine/mypoint.png" mode=""></image> <image src="/static/mine/mypoint.png" mode=""></image>
<view>我的积分</view> <view>我的积分</view>
</view> </view>
<view class="interact-item" @click="navigateTo('/pages/cart/coupon/myCoupon')"> <view
class="interact-item"
@click="navigateTo('/pages/cart/coupon/myCoupon')"
>
<image src="/static/mine/mycoupon.png" mode=""></image> <image src="/static/mine/mycoupon.png" mode=""></image>
<view>优惠券</view> <view>优惠券</view>
</view> </view>
<view class="interact-item" @click="navigateTo('/pages/mine/myCollect')"> <view
class="interact-item"
@click="navigateTo('/pages/mine/myCollect')"
>
<image src="/static/mine/myfavorite.png" mode=""></image> <image src="/static/mine/myfavorite.png" mode=""></image>
<view>我的关注</view> <view>我的关注</view>
</view> </view>
<view class="interact-item" @click="navigateTo('/pages/mine/myTracks')"> <view
class="interact-item"
@click="navigateTo('/pages/mine/myTracks')"
>
<image src="/static/mine/myhistory.png" mode=""></image> <image src="/static/mine/myhistory.png" mode=""></image>
<view>我的足迹</view> <view>我的足迹</view>
</view> </view>
<view class="interact-item" @click="navigateTo('/pages/order/evaluate/myEvaluate')"> <view
class="interact-item"
@click="navigateTo('/pages/order/evaluate/myEvaluate')"
>
<image src="/static/mine/mycommit.png" mode=""></image> <image src="/static/mine/mycommit.png" mode=""></image>
<view>我的评价</view> <view>我的评价</view>
</view> </view>
<view class="interact-item" @click="navigateTo('/pages/order/complain/complainList')"> <view
class="interact-item"
@click="navigateTo('/pages/order/complain/complainList')"
>
<image src="/static/mine/shensu.png" mode=""></image> <image src="/static/mine/shensu.png" mode=""></image>
<view>我的投诉</view> <view>我的投诉</view>
</view> </view>
<view class="interact-item" @click="navigateTo('/pages/mine/set/feedBack')"> <view
class="interact-item"
@click="navigateTo('/pages/mine/set/feedBack')"
>
<image src="/static/mine/feedback.png" mode=""></image> <image src="/static/mine/feedback.png" mode=""></image>
<view>意见反馈</view> <view>意见反馈</view>
</view> </view>
<view class="interact-item" @click="navigateTo('/pages/cart/coupon/couponCenter')"> <view
class="interact-item"
@click="navigateTo('/pages/cart/coupon/couponCenter')"
>
<image src="/static/mine/couponcenter.png" mode=""></image> <image src="/static/mine/couponcenter.png" mode=""></image>
<view>领券中心</view> <view>领券中心</view>
</view> </view>
<view class="interact-item" @click="navigateTo('/pages/mine/address/addressManage')"> <view
class="interact-item"
@click="navigateTo('/pages/mine/address/addressManage')"
>
<image src="/static/mine/myaddress.png" mode=""></image> <image src="/static/mine/myaddress.png" mode=""></image>
<view>地址管理</view> <view>地址管理</view>
</view> </view>
<view class="interact-item" @click="navigateTo('/pages/mine/set/setUp')"> <view
class="interact-item"
@click="navigateTo('/pages/mine/set/setUp')"
>
<image src="/static/mine/setting.png" mode=""></image> <image src="/static/mine/setting.png" mode=""></image>
<view>设置</view> <view>设置</view>
</view> </view>
<view class="interact-item" @click="distribution"> <view
class="interact-item"
@click="navigateTo('/pages/mine/mydistribution/index')"
v-if="userInfo.expert"
>
<image src="/static/mine/distribution.png" mode=""></image> <image src="/static/mine/distribution.png" mode=""></image>
<view>我的分销</view> <view>我的分销</view>
</view> </view>
<view class="interact-item" @click="navigateTo('/pages/promotion/bargain/log')"> <!-- <view class="interact-item" @click="distribution">
<image src="/static/mine/distribution.png" mode=""></image>
<view>我的分销</view>
</view> -->
<view
class="interact-item"
@click="navigateTo('/pages/promotion/bargain/log')"
>
<image src="/static/mine/kanjia.png" mode=""></image> <image src="/static/mine/kanjia.png" mode=""></image>
<view>砍价记录</view> <view>砍价记录</view>
</view> </view>
@ -66,8 +142,31 @@
<script> <script>
import { distribution } from "@/api/goods"; import { distribution } from "@/api/goods";
import { getUserInfo } from "@/api/members";
export default { export default {
props: {
// userInfo: {
// type: Object,
// default: () => {},
// },
},
data() {
return {
userInfo: {}, //
};
},
onShow() {},
onLoad() {},
mounted() {
this.getUser();
},
methods: { methods: {
getUser() {
getUserInfo().then((user) => {
this.userInfo = user.data.result;
});
},
navigateTo(url) { navigateTo(url) {
uni.navigateTo({ uni.navigateTo({
url, url,
@ -121,7 +220,6 @@ export default {
border-left: none; border-left: none;
border-right: none; border-right: none;
.interactBox { .interactBox {
height: 156rpx; height: 156rpx;
} }

50
plugins/Reg/RegExp.js Normal file
View File

@ -0,0 +1,50 @@
/**
* 各种正则表达式
* mobile 手机号
* email 电子邮箱
* password 密码6-20
* integer 正整数不包含0
* money 金钱
* TINumber 纳税识别号
* IDCard 身份证
* userName 账户名称汉字字母数字-_的组合
* URL URL
* TEL 固定电话
*/
// 手机号
export const mobile = /^0?(13[0-9]|14[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9])[0-9]{8}$/;
// 电子邮箱
export const email = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
// 密码【6-20位】
export const password = /^[@A-Za-z0-9!#$%^&*.~,]{6,20}$/;
// 正整数【不包含0】
export const integer = /^[1-9]\d*$/;
// 正整数【包含0】
export const Integer = /^[0-9]\d*$/;
// 金钱
export const money = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
// 纳税识别号
export const TINumber = /^((\d{6}[0-9A-Z]{9})|([0-9A-Za-z]{2}\d{6}[0-9A-Za-z]{10,12}))$/;
// 身份证
export const IDCard = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
// 账户名称【汉字、字母、数字、“-”、“_”的组合】
export const userName = /[A-Za-z0-9_\-\u4e00-\u9fa5]$/;
// URL
export const URL =
/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
// 固话
export const TEL = /0\d{2,3}-\d{7,8}/;
// 营业执照号
export const licenseNum = /(^(?:(?![IOZSV])[\dA-Z]){2}\d{6}(?:(?![IOZSV])[\dA-Z]){10}$)|(^\d{15}$)/;

BIN
static/abcx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

BIN
static/imlogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
static/logn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
static/mine/mon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
static/mine/mony.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
static/mine/shop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
static/mine/smk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
static/mine/stion.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

152
uni.css Normal file
View File

@ -0,0 +1,152 @@
@charset "UTF-8";
/* 页面左右间距 */
/* 文字尺寸 */
/*文字颜色*/
/* 边框颜色 */
/* 图片加载中颜色 */
/* 行为相关颜色 */
/*主题颜色 具体参考 https://ant.design/docs/spec/colors-cn */
/**微信登录按钮颜色 */
/**主颜色*/
/*用于金钱等颜色 */
/*主题高亮颜色*/
/*辅助高亮颜色*/
/*主题高亮背景颜色*/
/*价格红高亮背景颜色*/
/*辅助色*/
.light-color {
color: #fe3c3c;
}
.main-color {
color: #fe3c3c !important;
}
.bg-light-color {
/* #ifndef APP-NVUE */
background-color: #fe3c3c !important;
/* #endif */
}
.bg-light-color /deep/ * {
background-color: #fe3c3c !important;
}
.bg-main-color {
background-color: #fe3c3c !important;
}
.bg-linear-gradient {
background-image: linear-gradient(25deg, #fa123b, #ff6b35, #ff9f28, #ffcc03);
}
/* #ifndef APP-NVUE */
.uni-tabbar .uni-tabbar__icon {
width: 20px;
height: 18px;
}
/* #endif */
.flex {
display: flex;
}
.btn {
background-color: #fe3c3c;
color: #ffffff;
border-width: 0px;
/* #ifndef APP-NVUE */
border: none;
/* #endif */
border-color: transparent;
border-radius: 44px;
height: 44px;
box-shadow: none;
font-weight: 400;
font-style: normal;
line-height: 44px;
text-align: center;
}
.btn::after {
/* #ifndef APP-NVUE */
border: none;
/* #endif */
border-color: transparent;
}
.button-hover {
opacity: 0.7;
}
.margin {
margin: 10px;
}
.tag {
background-color: #f2f2f2;
color: #333333;
height: 28px;
border-radius: 28px;
box-shadow: none;
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
line-height: 28px;
text-align: center;
width: 90px;
}
.c-content {
background-color: #ffffff;
border-top: 1px solid #ebeef5;
border-bottom: 1px solid #ebeef5;
}
.mt-30 {
margin-top: 30rpx;
}
.border-top {
border-top: 1px solid #ebeef5;
}
.describe {
color: #909399;
font-size: 24rpx;
padding: 30rpx;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.flex-a-c {
align-items: center;
}
.relative {
position: relative;
}
/* #ifndef APP-NVUE */
.wes {
/* 多出部分用省略号表示 , 用于一行 */
overflow: hidden;
word-wrap: normal;
white-space: nowrap;
text-overflow: ellipsis;
}
.wes-2 {
/* 适用于webkit内核和移动端 */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
/* #endif */

View File

@ -29,13 +29,13 @@ $uni-color-error: #dd524d;
/**微信登录按钮颜色 */ /**微信登录按钮颜色 */
$weChat-color:#00a327; $weChat-color:#00a327;
/**主颜色*/ /**主颜色*/
$main-color: #ff3c2a; $main-color: #fe3c3c;
/*用于金钱等颜色 */ /*用于金钱等颜色 */
$price-color: #ff3c2a; $price-color: #fe3c3c;
/*主题高亮颜色*/ /*主题高亮颜色*/
$light-color: #ff6b35; $light-color: #fe3c3c;
/*辅助高亮颜色*/ /*辅助高亮颜色*/
$aider-light-color: #ff9f28; $aider-light-color: #fe3c3c;
/*主题高亮背景颜色*/ /*主题高亮背景颜色*/
$main-light-color: #edfcf7; $main-light-color: #edfcf7;

View File

@ -1,11 +1,7 @@
import Request from "@/lib/request/index.js"; import Request from "@/lib/request/index.js";
import { import { refreshTokenFn } from "@/api/login.js";
refreshTokenFn
} from "@/api/login.js";
import storage from "@/utils/storage.js"; import storage from "@/utils/storage.js";
import { import { md5 } from "@/utils/md5.js";
md5
} from "@/utils/md5.js";
import Foundation from "@/utils/Foundation.js"; import Foundation from "@/utils/Foundation.js";
import api from "@/config/api.js"; import api from "@/config/api.js";
@ -28,10 +24,10 @@ function cleanStorage() {
storage.setUuid(""); storage.setUuid("");
storage.setUserInfo({}); storage.setUserInfo({});
// 清理vlog信息 // 清理vlog信息
storage.setVlogToken("") storage.setVlogToken("");
storage.setVlogUserInfo({}) storage.setVlogUserInfo({});
// 清除初始化数据内容 // 清除初始化数据内容
storage.setRefreshVlogIndex('0') //不需要刷新 storage.setRefreshVlogIndex("0"); //不需要刷新
// 防抖处理跳转 // 防抖处理跳转
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
@ -44,16 +40,22 @@ function cleanStorage() {
// #ifndef MP-WEIXIN // #ifndef MP-WEIXIN
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const currentRoute = currentPage.route;
console.log(currentRoute,'===');
setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url: "/pages/passport/login", url: "/pages/passport/login",
}); });
}, 5000);
// #endif // #endif
} }
let http = new Request(); let http = new Request();
http.setConfig((config) => { http.setConfig((config) => {
// 没有uuid创建 // 没有uuid创建
if (!storage.getUuid()) { if (!storage.getUuid()) {
@ -89,12 +91,11 @@ http.interceptors.request.use(
let params = config.params || {}; let params = config.params || {};
params = { params = {
...params, ...params,
..._params ..._params,
}; };
config.params = params; config.params = params;
config.header.accessToken = accessToken; config.header.accessToken = accessToken;
} }
// 配置vlog所需参数 // 配置vlog所需参数
let vlogToken = storage.getVlogToken(); let vlogToken = storage.getVlogToken();
@ -117,7 +118,6 @@ http.interceptors.request.use(
} }
); );
// 是否正在刷新的标记 // 是否正在刷新的标记
let isRefreshing = false; let isRefreshing = false;
//重试队列 //重试队列
@ -144,10 +144,7 @@ http.interceptors.response.use(
//调用刷新token的接口 //调用刷新token的接口
return refreshTokenFn(storage.getRefreshToken()) return refreshTokenFn(storage.getRefreshToken())
.then((res) => { .then((res) => {
let { let { accessToken, refreshToken } = res.data.result;
accessToken,
refreshToken
} = res.data.result;
storage.setAccessToken(accessToken); storage.setAccessToken(accessToken);
storage.setRefreshToken(refreshToken); storage.setRefreshToken(refreshToken);
@ -194,8 +191,7 @@ http.interceptors.response.use(
duration: 1500, duration: 1500,
}); });
} }
} } else if (response.data.code == 502) {
else if (response.data.code==502){
cleanStorage(); cleanStorage();
} }
return response; return response;
@ -205,9 +201,7 @@ http.interceptors.response.use(
} }
); );
export { export { http };
http
};
export const Method = { export const Method = {
GET: "GET", GET: "GET",